aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/sched_fair.c
diff options
context:
space:
mode:
authorTony Lindgren <tony@atomide.com>2011-02-25 15:27:14 -0500
committerTony Lindgren <tony@atomide.com>2011-02-25 15:27:14 -0500
commit02fa9f0451ac639a687bfc145eefe58703ff220e (patch)
treefe984acc78f22f6eb8fb98efaba8b1ac2f3ad8d9 /kernel/sched_fair.c
parentcbc9438075ca9dee3f39a2e7310f81c304b40359 (diff)
parent51c404b2c514930e98e81e0b9294f19892a4f871 (diff)
Merge branch 'patches_for_2.6.38rc' of git://git.pwsan.com/linux-2.6 into devel-fixes
Diffstat (limited to 'kernel/sched_fair.c')
-rw-r--r--kernel/sched_fair.c13
1 files changed, 5 insertions, 8 deletions
diff --git a/kernel/sched_fair.c b/kernel/sched_fair.c
index 354769979c02..0c26e2df450e 100644
--- a/kernel/sched_fair.c
+++ b/kernel/sched_fair.c
@@ -722,10 +722,10 @@ static void update_cfs_load(struct cfs_rq *cfs_rq, int global_update)
722 u64 now, delta; 722 u64 now, delta;
723 unsigned long load = cfs_rq->load.weight; 723 unsigned long load = cfs_rq->load.weight;
724 724
725 if (!cfs_rq) 725 if (cfs_rq->tg == &root_task_group)
726 return; 726 return;
727 727
728 now = rq_of(cfs_rq)->clock; 728 now = rq_of(cfs_rq)->clock_task;
729 delta = now - cfs_rq->load_stamp; 729 delta = now - cfs_rq->load_stamp;
730 730
731 /* truncate load history at 4 idle periods */ 731 /* truncate load history at 4 idle periods */
@@ -830,9 +830,6 @@ static void update_cfs_shares(struct cfs_rq *cfs_rq, long weight_delta)
830 struct sched_entity *se; 830 struct sched_entity *se;
831 long shares; 831 long shares;
832 832
833 if (!cfs_rq)
834 return;
835
836 tg = cfs_rq->tg; 833 tg = cfs_rq->tg;
837 se = tg->se[cpu_of(rq_of(cfs_rq))]; 834 se = tg->se[cpu_of(rq_of(cfs_rq))];
838 if (!se) 835 if (!se)
@@ -1432,7 +1429,7 @@ static inline unsigned long effective_load(struct task_group *tg, int cpu,
1432 1429
1433static int wake_affine(struct sched_domain *sd, struct task_struct *p, int sync) 1430static int wake_affine(struct sched_domain *sd, struct task_struct *p, int sync)
1434{ 1431{
1435 unsigned long this_load, load; 1432 s64 this_load, load;
1436 int idx, this_cpu, prev_cpu; 1433 int idx, this_cpu, prev_cpu;
1437 unsigned long tl_per_task; 1434 unsigned long tl_per_task;
1438 struct task_group *tg; 1435 struct task_group *tg;
@@ -1471,8 +1468,8 @@ static int wake_affine(struct sched_domain *sd, struct task_struct *p, int sync)
1471 * Otherwise check if either cpus are near enough in load to allow this 1468 * Otherwise check if either cpus are near enough in load to allow this
1472 * task to be woken on this_cpu. 1469 * task to be woken on this_cpu.
1473 */ 1470 */
1474 if (this_load) { 1471 if (this_load > 0) {
1475 unsigned long this_eff_load, prev_eff_load; 1472 s64 this_eff_load, prev_eff_load;
1476 1473
1477 this_eff_load = 100; 1474 this_eff_load = 100;
1478 this_eff_load *= power_of(prev_cpu); 1475 this_eff_load *= power_of(prev_cpu);