]> git.baikalelectronics.ru Git - kernel.git/commit
timers: Consider slack value in mod_timer()
authorSebastian Andrzej Siewior <sebastian@breakpoint.cc>
Sat, 21 May 2011 10:58:28 +0000 (12:58 +0200)
committerThomas Gleixner <tglx@linutronix.de>
Fri, 3 Jun 2011 13:02:32 +0000 (15:02 +0200)
commit68f27ed2f18454786fd00d2fc6e42f2a2ace60a8
treed46a1e4a1914f3bc307f8f6215864144926d0193
parent3c9a5c42fdc5ed1eb00b1741a6a8ecdbba2a8a0d
timers: Consider slack value in mod_timer()

There is an optimization which does not update the timer if the timer
was pending and the expiration time was unchanged.

Since commit 1df40c78 ("timers: Introduce the concept of timer slack
for legacy timers") this optimization is no longer applied for timers
where the expiration time got extended due to the slack value. So we
need to check again after the expiration time might have been updated.

[ tglx: Made it a single check by applying slack first and sorting
  out the slack = 0 value (all timeouts < 256 jiffies) early ]

Signed-off-by: Sebastian Andrzej Siewior <sebastian@breakpoint.cc>
Link: http://lkml.kernel.org/r/20110521105828.GA29442@Chamillionaire.breakpoint.cc
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
kernel/timer.c