Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 98031
b: refs/heads/master
c: 7a232e0
h: refs/heads/master
i:
  98029: a2de652
  98027: e7755f6
  98023: f42e7e5
  98015: d5a0bb7
v: v3
  • Loading branch information
Lai Jiangshan authored and Ingo Molnar committed Jun 12, 2008
1 parent 4d1d9ae commit 06819f0
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 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: 2e084786f6fe052274f1dfa7c675fe4a02cacd6e
refs/heads/master: 7a232e0350940d2664f4de5cc3f0f443bae5062d
9 changes: 7 additions & 2 deletions trunk/kernel/sched.c
Original file line number Diff line number Diff line change
Expand Up @@ -1340,8 +1340,13 @@ calc_delta_mine(unsigned long delta_exec, unsigned long weight,
{
u64 tmp;

if (!lw->inv_weight)
lw->inv_weight = 1 + (WMULT_CONST-lw->weight/2)/(lw->weight+1);
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);
}

tmp = (u64)delta_exec * weight;
/*
Expand Down

0 comments on commit 06819f0

Please sign in to comment.