aboutsummaryrefslogtreecommitdiffstats
path: root/include/asm-mn10300/bug.h
diff options
context:
space:
mode:
authorPeter Zijlstra <a.p.zijlstra@chello.nl>2008-06-27 07:41:30 -0400
committerIngo Molnar <mingo@elte.hu>2008-06-27 08:31:42 -0400
commit4be9daaa1b33701f011f4117f22dc1e45a3e6e34 (patch)
tree8c823cf397055c4919cc5f2a6275f125b0580a6b /include/asm-mn10300/bug.h
parent42a3ac7d5cee89849448b41b86faeb86f98e92f6 (diff)
sched: fix task_h_load()
Currently task_h_load() computes the load of a task and uses that to either subtract it from the total, or add to it. However, removing or adding a task need not have any effect on the total load at all. Imagine adding a task to a group that is local to one cpu - in that case the total load of that cpu is unaffected. So properly compute addition/removal: s_i = S * rw_i / \Sum_j rw_j s'_i = S * (rw_i + wl) / (\Sum_j rw_j + wg) then s'_i - s_i gives the change in load. Where s_i is the shares for cpu i, S the group weight, rw_i the runqueue weight for that cpu, wl the weight we add (subtract) and wg the weight contribution to the runqueue. Signed-off-by: Peter Zijlstra <peterz@infradead.org> 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 'include/asm-mn10300/bug.h')
0 files changed, 0 insertions, 0 deletions