relay: fix timer madness v3
PATCH 1/1 relay: fix timer madness v3
Changed from v2:
mod timer interval changed from HZ/10 to jiffies + HZ/10, as Dan Carpenter suggested.
This patch is based on -mm tree.
Signed-off-by zhangwei(Jovi) <[email protected]>
Cc Dan Carpenter <[email protected]>
Cc Ingo Molnar <[email protected]>
Cc Steven Rostedt <[email protected]>
Cc Jens Axboe <[email protected]>
Cc Al Viro <[email protected]>
Cc Eric Dumazet <[email protected]>
--- kernel/relay.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
kernel/relay.c +2 -2
@@ -342,7 +342,7 @@ static void wakeup_readers(unsigned long data)/* * Stupid polling for now: */ -mod_timer (&buf->timer,HZ /10 ); +mod_timer (&buf->timer, jiffies +HZ /10 ); }/**
@@ -360,7 +360,7 @@ static void __relay_reset(struct rchan_buf *buf, unsigned int init)init_waitqueue_head (&buf->read_wait);kref_init (&buf->kref);setup_timer (&buf->timer, wakeup_readers, (unsigned long )buf); -mod_timer (&buf->timer,HZ /10 ); +mod_timer (&buf->timer, jiffies +HZ /10 ); }else del_timer_sync (&buf->timer);
Signature · 1 line
1.7.9.7
Quoted 5 lines · zhangwei(Jovi)
Changed from v2:
mod timer interval changed from HZ/10 to jiffies + HZ/10, as Dan Carpenter suggested.This patch is based on -mm tree.
This is one of those guess-what-I'm-thinking commit messages. Can you please write it this way:
The situation currently is A, the bug is B, I'm fixing it by doing C.
Don't be afraid to be more verbose.
An innocent bystander can only guess why the change was done and I'm willing to bet good money that a couple of years from now, not even you will know why you did it.
Thanks.
Signature · 5 lines
Regards/Gruss,
Boris.
Sent from a fat crate under my desk. Formatting is fine.
--