Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 26872
b: refs/heads/master
c: 0662b71
h: refs/heads/master
v: v3
  • Loading branch information
Zachary Amsden authored and Linus Torvalds committed May 21, 2006
1 parent 32911b7 commit c561c90
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 8b1ea24c6cc529f6860c458b1c0872f22e74c950
refs/heads/master: 0662b71322e211dba9a4bc0e6fbca7861a2b5a7d
16 changes: 16 additions & 0 deletions trunk/kernel/timer.c
Original file line number Diff line number Diff line change
Expand Up @@ -541,6 +541,22 @@ unsigned long next_timer_interrupt(void)
}
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;

Expand Down

0 comments on commit c561c90

Please sign in to comment.