Hi Mike and everyone, This patchset redoes 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 is based on previous simplification patches by Adam Jackson and Chris Leech. The last patch in the series is the biggest, and the diff is messy as a result of refactoring. I'd recommend applying the series and reviewing the result, rather than reviewing the diff. This series is also available in this git repo: https://github.com/agrover/open-iscsi.git actor-rewrite I have done basic testing and it works for me in basic login/logout cases. The one interesting thing is that the event loop runs much less frequently, so reap_proc() may not execute for a while if nothing else causes poll() to wake up. Looking forward to hearing what you think. 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 (2): Remove actor_init and rename actor_new to actor_init Make running actors event-driven Chris Leech (1): actor: Don't wake up poll() on a timeout if we don't need to include/list.h | 6 ++ usr/Makefile | 4 +- usr/actor.c | 297 ++++++++++++++++++++++++------------------------------- usr/actor.h | 14 +-- usr/event_poll.c | 47 +++++++-- usr/initiator.c | 28 +++--- usr/iscsid.c | 1 - usr/iscsistart.c | 1 - 8 files changed, 196 insertions(+), 202 deletions(-) -- 1.9.3 -- 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.
