Peter Zijlstra 83378269a5 sched: correct wakeup weight calculations
rw_i = {2, 4, 1, 0}
s_i = {2/7, 4/7, 1/7, 0}

wakeup on cpu0, weight=1

rw'_i = {3, 4, 1, 0}
s'_i = {3/8, 4/8, 1/8, 0}

s_0 = S * rw_0 / \Sum rw_j ->
  \Sum rw_j = S*rw_0/s_0 = 1*2*7/2 = 7 (correct)

s'_0 = S * (rw_0 + 1) / (\Sum rw_j + 1) =
       1 * (2+1) / (7+1) = 3/8 (correct

so we find that adding 1 to cpu0 gains 5/56 in weight
if say the other cpu were, cpu1, we'd also have to calculate its 4/56 loss

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>
2008-06-27 14:31:46 +02:00
..
2008-05-01 08:03:59 -07:00
2008-06-23 11:30:23 +02:00
2008-05-16 17:22:26 -04:00
2008-03-30 14:18:41 -07:00
2008-01-25 21:08:29 +01:00
2007-07-16 09:05:50 -07:00
2008-06-24 10:52:55 -05:00
2008-05-01 13:08:16 -04:00
2008-04-30 08:29:49 -07:00
2008-02-08 09:22:31 -08:00
2008-04-29 08:05:59 -07:00
2008-04-30 08:29:48 -07:00
2008-05-01 08:03:58 -07:00
2008-05-01 10:21:54 -07:00
2008-01-25 21:08:24 +01:00
2008-02-13 16:21:18 -08:00
2008-01-25 21:08:24 +01:00
2007-07-16 09:05:50 -07:00
2008-05-10 20:43:22 -07:00
2008-01-30 13:31:20 +01:00
2008-02-06 10:41:02 -08:00
2008-02-05 09:44:07 -08:00
2008-06-27 14:31:45 +02:00
2008-04-30 08:29:48 -07:00
2008-04-30 08:29:53 -07:00
2008-02-08 09:22:31 -08:00