diff options
author | Thomas Gleixner <tglx@linutronix.de> | 2010-05-25 20:43:30 +0200 |
---|---|---|
committer | Thomas Gleixner <tglx@linutronix.de> | 2010-05-25 21:07:48 +0200 |
commit | 8e63d7795e30b4091e303cc8c060509bd8eea742 (patch) | |
tree | d5433cf6b0a57b72b0220ff8e1d89ceca6fbd49c /mm | |
parent | f16a5e347835c6a0ba958535cf6e6c89d50463b8 (diff) | |
download | linux-8e63d7795e30b4091e303cc8c060509bd8eea742.tar.bz2 |
timers: Fix slack calculation really
commit f00e047ef (timers: Fix slack calculation for expired timers)
fixed the issue of slack on expired timers only partially. Linus
noticed that jiffies is volatile so it is reloaded twice, which
generates bad code.
But its worse. This can defeat the time_after() check if jiffies are
incremented between time_after() and the slack calculation.
Fix it by reading jiffies into a local variable, which prevents the
compiler from loading it twice. While at it make the > -1 check into
>= 0 which is easier to read.
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Cc: Arjan van de Ven <arjan@linux.intel.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'mm')
0 files changed, 0 insertions, 0 deletions