aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/sched.c
diff options
context:
space:
mode:
authorPeter Zijlstra <a.p.zijlstra@chello.nl>2008-06-27 07:41:11 -0400
committerIngo Molnar <mingo@elte.hu>2008-06-27 08:31:27 -0400
commita7be37ac8e1565e00880531f4e2aff421a21c803 (patch)
tree82eb64ba5b221c3abea6d6f56c692841faea813a /kernel/sched.c
parentbf647b62fdb948e757a7b4d18d4f16e3c763b1d1 (diff)
sched: revert the revert of: weight calculations
Try again.. initial commit: 8f1bc385cfbab474db6c27b5af1e439614f3025c revert: f9305d4a0968201b2818dbed0dc8cb0d4ee7aeb3 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.c')
-rw-r--r--kernel/sched.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/kernel/sched.c b/kernel/sched.c
index c51d9fae8cd8..f653af684fb3 100644
--- a/kernel/sched.c
+++ b/kernel/sched.c
@@ -1342,6 +1342,9 @@ static void __resched_task(struct task_struct *p, int tif_bit)
1342 */ 1342 */
1343#define SRR(x, y) (((x) + (1UL << ((y) - 1))) >> (y)) 1343#define SRR(x, y) (((x) + (1UL << ((y) - 1))) >> (y))
1344 1344
1345/*
1346 * delta *= weight / lw
1347 */
1345static unsigned long 1348static unsigned long
1346calc_delta_mine(unsigned long delta_exec, unsigned long weight, 1349calc_delta_mine(unsigned long delta_exec, unsigned long weight,
1347 struct load_weight *lw) 1350 struct load_weight *lw)
@@ -1369,12 +1372,6 @@ calc_delta_mine(unsigned long delta_exec, unsigned long weight,
1369 return (unsigned long)min(tmp, (u64)(unsigned long)LONG_MAX); 1372 return (unsigned long)min(tmp, (u64)(unsigned long)LONG_MAX);
1370} 1373}
1371 1374
1372static inline unsigned long
1373calc_delta_fair(unsigned long delta_exec, struct load_weight *lw)
1374{
1375 return calc_delta_mine(delta_exec, NICE_0_LOAD, lw);
1376}
1377
1378static inline void update_load_add(struct load_weight *lw, unsigned long inc) 1375static inline void update_load_add(struct load_weight *lw, unsigned long inc)
1379{ 1376{
1380 lw->weight += inc; 1377 lw->weight += inc;