Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 198141
b: refs/heads/master
c: f00e047
h: refs/heads/master
i:
  198139: 397a15c
v: v3
  • Loading branch information
Jeff Chua authored and Thomas Gleixner committed May 24, 2010
1 parent 450715a commit 0f13493
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: bd45b7a385c5ffd82c11a1d51880be18559e5ad9
refs/heads/master: f00e047efdf9d31c8a7dd7875b411f97cfa7d8e5
7 changes: 4 additions & 3 deletions trunk/kernel/timer.c
Original file line number Diff line number Diff line change
Expand Up @@ -750,13 +750,14 @@ unsigned long apply_slack(struct timer_list *timer, unsigned long expires)
unsigned long expires_limit, mask;
int bit;

expires_limit = expires + timer->slack;
expires_limit = expires;

if (timer->slack < 0) /* auto slack: use 0.4% */
if (timer->slack > -1)
expires_limit = expires + timer->slack;
else if (time_after(expires, jiffies)) /* auto slack: use 0.4% */
expires_limit = expires + (expires - jiffies)/256;

mask = expires ^ expires_limit;

if (mask == 0)
return expires;

Expand Down

0 comments on commit 0f13493

Please sign in to comment.