diff options
author | Peter Zijlstra <a.p.zijlstra@chello.nl> | 2008-06-27 07:41:13 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2008-06-27 08:31:28 -0400 |
commit | ced8aa16e1db55c33c507174c1b1f9e107445865 (patch) | |
tree | 87210bb14026a7a3d005b5339dae44d845f27708 /kernel/sched_fair.c | |
parent | c9c294a630e28eec5f2865f028ecfc58d45c0a5a (diff) |
sched: fix calc_delta_asym, #2
Ok, so why are we in this mess, it was:
1/w
but now we mixed that rw in the mix like:
rw/w
rw being \Sum w suggests: fiddling w, we should also fiddle rw, humm?
Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Srivatsa Vaddagiri <vatsa@linux.vnet.ibm.com>
Cc: Mike Galbraith <efault@gmx.de>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'kernel/sched_fair.c')
-rw-r--r-- | kernel/sched_fair.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/kernel/sched_fair.c b/kernel/sched_fair.c index 2268e634812b..2e197b8e43f1 100644 --- a/kernel/sched_fair.c +++ b/kernel/sched_fair.c | |||
@@ -429,6 +429,7 @@ calc_delta_asym(unsigned long delta, struct sched_entity *se) | |||
429 | 429 | ||
430 | for_each_sched_entity(se) { | 430 | for_each_sched_entity(se) { |
431 | struct load_weight *se_lw = &se->load; | 431 | struct load_weight *se_lw = &se->load; |
432 | unsigned long rw = cfs_rq_of(se)->load.weight; | ||
432 | 433 | ||
433 | #ifdef CONFIG_FAIR_SCHED_GROUP | 434 | #ifdef CONFIG_FAIR_SCHED_GROUP |
434 | struct cfs_rq *cfs_rq = se->my_q; | 435 | struct cfs_rq *cfs_rq = se->my_q; |
@@ -450,14 +451,16 @@ calc_delta_asym(unsigned long delta, struct sched_entity *se) | |||
450 | lw.inv_weight = 0; | 451 | lw.inv_weight = 0; |
451 | 452 | ||
452 | se_lw = &lw; | 453 | se_lw = &lw; |
454 | rw += lw.weight - se->load.weight; | ||
453 | } else | 455 | } else |
454 | #endif | 456 | #endif |
455 | 457 | ||
456 | if (se->load.weight < NICE_0_LOAD) | 458 | if (se->load.weight < NICE_0_LOAD) { |
457 | se_lw = &lw; | 459 | se_lw = &lw; |
460 | rw += NICE_0_LOAD - se->load.weight; | ||
461 | } | ||
458 | 462 | ||
459 | delta = calc_delta_mine(delta, | 463 | delta = calc_delta_mine(delta, rw, se_lw); |
460 | cfs_rq_of(se)->load.weight, se_lw); | ||
461 | } | 464 | } |
462 | 465 | ||
463 | return delta; | 466 | return delta; |