]> 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)
commit38a88421d39cbef3ca63da1311591d9dc9ed7d82
treed46a1e4a1914f3bc307f8f6215864144926d0193
parent9f2a020df007791944ce7c48237a63a36168ef35
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