diff options
author | John W. Linville <linville@tuxdriver.com> | 2006-05-22 14:26:25 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2006-05-22 14:26:25 -0400 |
commit | 3b38f317e529d8396377dafc7d95a1451a151df5 (patch) | |
tree | 65e80799417c456bdd907b7d80182732be02e5f4 /kernel/timer.c | |
parent | 5d25ea7c0c77cbdba1b5f092d60d624e24dfa938 (diff) | |
parent | 353b28bafd1b962359a866ff263a7fad833d29a1 (diff) |
Merge branch 'from-linus' into upstream
Diffstat (limited to 'kernel/timer.c')
-rw-r--r-- | kernel/timer.c | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/kernel/timer.c b/kernel/timer.c index 67eaf0f5409..9e49deed468 100644 --- a/kernel/timer.c +++ b/kernel/timer.c @@ -541,6 +541,22 @@ found: } spin_unlock(&base->lock); + /* + * It can happen that other CPUs service timer IRQs and increment + * jiffies, but we have not yet got a local timer tick to process + * the timer wheels. In that case, the expiry time can be before + * jiffies, but since the high-resolution timer here is relative to + * jiffies, the default expression when high-resolution timers are + * not active, + * + * time_before(MAX_JIFFY_OFFSET + jiffies, expires) + * + * would falsely evaluate to true. If that is the case, just + * return jiffies so that we can immediately fire the local timer + */ + if (time_before(expires, jiffies)) + return jiffies; + if (time_before(hr_expires, expires)) return hr_expires; |