ia64/xen-unstable

view patches/linux-2.6.16.13/fix-hz-suspend.patch @ 10599:18f8dde91fbd

Replace my previous patch with equivalent fix from linux-2.6.17.
Might as well stay as close to that as we can...
Signed-off-by: Emmanuel Ackaouy <ack@xensource.com>
author ack@localhost.localdomain
date Thu Jun 29 14:39:07 2006 +0100 (2006-06-29)
parents 4b45f7f62dc7
children
line source
1 diff -pruN ../pristine-linux-2.6.16.13/kernel/timer.c ./kernel/timer.c
2 --- ../pristine-linux-2.6.16.13/kernel/timer.c 2006-05-02 22:38:44.000000000 +0100
3 +++ ./kernel/timer.c 2006-06-29 14:34:12.788957720 +0100
4 @@ -555,6 +555,22 @@ found:
5 }
6 spin_unlock(&base->t_base.lock);
8 + /*
9 + * It can happen that other CPUs service timer IRQs and increment
10 + * jiffies, but we have not yet got a local timer tick to process
11 + * the timer wheels. In that case, the expiry time can be before
12 + * jiffies, but since the high-resolution timer here is relative to
13 + * jiffies, the default expression when high-resolution timers are
14 + * not active,
15 + *
16 + * time_before(MAX_JIFFY_OFFSET + jiffies, expires)
17 + *
18 + * would falsely evaluate to true. If that is the case, just
19 + * return jiffies so that we can immediately fire the local timer
20 + */
21 + if (time_before(expires, jiffies))
22 + return jiffies;
23 +
24 if (time_before(hr_expires, expires))
25 return hr_expires;