Antw: [PATCH 8/9] Remove actor_init and rename actor_new to actor_init

2014-10-08 Thread Ulrich Windl
>>> Andy Grover schrieb am 08.10.2014 um 21:19 in Nachricht <1412795975-4443-9-git-send-email-agro...@redhat.com>: > We don't need actor_init because static variables are already initialized > to zero. ...if you never need to re-initialize. Ulrich -- You received this message because you are

[PATCH 4/9] actor: Remove ACTOR_TICKS_10MS()

2014-10-08 Thread Andy Grover
From: Adam Jackson Again, just obfuscation. Signed-off-by: Adam Jackson --- usr/actor.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/usr/actor.c b/usr/actor.c index 9c2f449..e4e8a24 100644 --- a/usr/actor.c +++ b/usr/actor.c @@ -38,7 +38,6 @@ static volatile uint64_t

[PATCH 7/9] actor: Don't wake up poll() on a timeout if we don't need to

2014-10-08 Thread Andy Grover
From: Chris Leech Have actor_poll take an indication from the outer event loop of how many ticks of ACTOR_RESOLUTION have passed, and return how many ticks into the future it would like to be called again. Then in event_loop, try and keep the poll timeouts as long as possible without delaying ac

[PATCH 9/9] Make running actors event-driven

2014-10-08 Thread Andy Grover
Instead of waking up frequently to check if actors need to run, set an alarm for the first timeout and use a signalfd to get us out of poll() when the alarm expires and SIGALRM is sent. alarm(2) only has second granularity but we are using delayed actors for multi-second timeout handling so this i

[PATCH 8/9] Remove actor_init and rename actor_new to actor_init

2014-10-08 Thread Andy Grover
We don't need actor_init because static variables are already initialized to zero. Rename actor_new to actor_init because "new" sounds like we're allocating something and we're not -- the function is initializing the existing struct actor. Signed-off-by: Andy Grover --- usr/actor.c | 8 +-

[PATCH 5/9] actor: Unobfuscate ACTOR_MAX_LOOPS

2014-10-08 Thread Andy Grover
From: Adam Jackson Signed-off-by: Adam Jackson --- usr/actor.c | 2 +- usr/actor.h | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/usr/actor.c b/usr/actor.c index e4e8a24..c084176 100644 --- a/usr/actor.c +++ b/usr/actor.c @@ -240,7 +240,7 @@ actor_poll(void) /* don

[PATCH 3/9] actor: s/ACTOR_TICKS/actor_jiffies/

2014-10-08 Thread Andy Grover
From: Adam Jackson No reason to obscure this. Signed-off-by: Adam Jackson --- usr/actor.c | 7 +++ 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/usr/actor.c b/usr/actor.c index fb90924..9c2f449 100644 --- a/usr/actor.c +++ b/usr/actor.c @@ -38,7 +38,6 @@ static volatile uin

[PATCH 1/9] actor: Mark actor_check static

2014-10-08 Thread Andy Grover
From: Adam Jackson Signed-off-by: Adam Jackson --- usr/actor.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/usr/actor.c b/usr/actor.c index b8f8e61..880bf81 100644 --- a/usr/actor.c +++ b/usr/actor.c @@ -199,7 +199,7 @@ actor_timer_mod(actor_t *thread, uint32_t timeout, v

[PATCH 6/9] actor: Simplify actor_poll a little

2014-10-08 Thread Andy Grover
From: Adam Jackson Finally, a functionality change. Having expanded ACTOR_MAX_LOOPS it's now obvious that we were basically only doing actor_check() on every other call. Also, the commentary is just wrong on many levels, we'd only get called about every 250ms anyway. Just call actor_check ever

[PATCH 2/9] actor: simplify actor_check

2014-10-08 Thread Andy Grover
From: Adam Jackson Now that it's static we know it can't ever be called when poll_in_progress is true. Signed-off-by: Adam Jackson --- usr/actor.c | 15 --- 1 file changed, 4 insertions(+), 11 deletions(-) diff --git a/usr/actor.c b/usr/actor.c index 880bf81..fb90924 100644 --- a/

[PATCH 0/9] Rewrite event handling

2014-10-08 Thread Andy Grover
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 simplifi