Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 200602
b: refs/heads/master
c: 0d98bb2
h: refs/heads/master
v: v3
  • Loading branch information
Will Deacon authored and Ingo Molnar committed Jun 25, 2010
1 parent 8b8ffc9 commit 7f23cbc
Show file tree
Hide file tree
Showing 2 changed files with 7 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: 3c93717cfa51316e4dbb471e7c0f9d243359d5f8
refs/heads/master: 0d98bb2656e9bd2dfda2d089db1fe1dbdab41504
6 changes: 6 additions & 0 deletions trunk/kernel/sched.c
Original file line number Diff line number Diff line change
Expand Up @@ -1254,6 +1254,12 @@ static void sched_avg_update(struct rq *rq)
s64 period = sched_avg_period();

while ((s64)(rq->clock - rq->age_stamp) > period) {
/*
* Inline assembly required to prevent the compiler
* optimising this loop into a divmod call.
* See __iter_div_u64_rem() for another example of this.
*/
asm("" : "+rm" (rq->age_stamp));
rq->age_stamp += period;
rq->rt_avg /= 2;
}
Expand Down

0 comments on commit 7f23cbc

Please sign in to comment.