Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 245606
b: refs/heads/master
c: db670da
h: refs/heads/master
v: v3
  • Loading branch information
Stephan Baerwolf authored and Ingo Molnar committed May 16, 2011
1 parent 35f6529 commit d7fe6c5
Show file tree
Hide file tree
Showing 2 changed files with 4 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: db44fc017d5989302713ab4e7f9e922b648f4b59
refs/heads/master: db670dac49b5423b39b5e523d28fe32045d71b10
6 changes: 3 additions & 3 deletions trunk/kernel/sched.c
Original file line number Diff line number Diff line change
Expand Up @@ -1330,15 +1330,15 @@ calc_delta_mine(unsigned long delta_exec, unsigned long weight,
{
u64 tmp;

tmp = (u64)delta_exec * weight;

if (!lw->inv_weight) {
if (BITS_PER_LONG > 32 && unlikely(lw->weight >= WMULT_CONST))
lw->inv_weight = 1;
else
lw->inv_weight = 1 + (WMULT_CONST-lw->weight/2)
/ (lw->weight+1);
lw->inv_weight = WMULT_CONST / lw->weight;
}

tmp = (u64)delta_exec * weight;
/*
* Check whether we'd overflow the 64-bit multiplication:
*/
Expand Down

0 comments on commit d7fe6c5

Please sign in to comment.