Hey Andy,

Sorry for the delay. Patches look good to me.

Was the last issue the case where if actor_schedule_private gets 0 for
delay_secs or does that just work?

For example when we do: iscsi_sched_ev_context() handles
EV_CONN_RECV_PDU event -> actor_schedule() -> actor_schedule_private().
In that type of case, what would force us to always handle that event/actor?

Does it currently work because we would normally get an event indicating
we have got something like a nl message and handle it here:

if (poll_array[POLL_CTRL].revents)
        ipc->ctldev_handle();

The nl handling code in ctldev_handle would call
iscsi_sched_ev_context() and put the actor on the actor linked list. We
would then reloop:

while (1) {
....

and then call

actor_poll();

where the actor would be handled.

Is the only problem case if that actor handler then wanted to call
actor_schedule(), because we could then fall into the poll() call
passing -1 if there was nothing to reap? I am checking out the code now
to see if this can ever happen.





On 11/03/2014 04:43 PM, Andy Grover wrote:
> Hi Mike and everyone,
> 
> Version 2 of the patchset to redo actor.c to use alarm(2) to wake up
> for expiring timers instead of needing to wake up 4 times a second. We
> do not need fine granularity for these, so computing everything in
> seconds works fine and makes the code simpler.
> 
> This series is also available in this git repo:
> 
> https://github.com/agrover/open-iscsi.git actor-rewrite2
> 
> Changes from v1:
> * Cancel upcoming alarm if just removed last entry on pend_list
> * Wake up once per second to waitpid(), but only if needed
> * Squash Chris's patch into #8, since #8 mostly reverses it
> * Integrated previously-posted patch that fixed pend_list insertion
>   logic
> * Tested initial login failure/timeout, logout timeout, relogin cases,
>   no issues.
> 
> Thanks! -- Regards -- Andy
> 
> Adam Jackson (6):
>   actor: Mark actor_check static
>   actor: simplify actor_check
>   actor: s/ACTOR_TICKS/actor_jiffies/
>   actor: Remove ACTOR_TICKS_10MS()
>   actor: Unobfuscate ACTOR_MAX_LOOPS
>   actor: Simplify actor_poll a little
> 
> Andy Grover (3):
>   Remove actor_init and rename actor_new to actor_init
>   Make running actors event-driven
>   Wake up to reap children
> 
>  include/list.h   |   6 ++
>  usr/Makefile     |   4 +-
>  usr/actor.c      | 303 
> +++++++++++++++++++++++++------------------------------
>  usr/actor.h      |  14 +--
>  usr/event_poll.c |  53 ++++++++--
>  usr/initiator.c  |  28 ++---
>  usr/iscsid.c     |   1 -
>  usr/iscsistart.c |   1 -
>  8 files changed, 207 insertions(+), 203 deletions(-)
> 

-- 
You received this message because you are subscribed to the Google Groups 
"open-iscsi" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/open-iscsi.
For more options, visit https://groups.google.com/d/optout.

Reply via email to