]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
sched: sched_slice() fixlet
authorLin Ming <ming.m.lin@intel.com>
Thu, 15 Jan 2009 16:17:15 +0000 (17:17 +0100)
committerIngo Molnar <mingo@elte.hu>
Thu, 15 Jan 2009 20:07:57 +0000 (21:07 +0100)
Mike's change: 0a582440f "sched: fix sched_slice())" broke group
scheduling by forgetting to reload cfs_rq on each loop.

This patch fixes aim7 regression and specjbb2005 regression becomes
less than 1.5% on 8-core stokley.

Signed-off-by: Lin Ming <ming.m.lin@intel.com>
Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
Tested-by: Jayson King <dev@jaysonking.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
kernel/sched_fair.c

index 16b419bb8b0aa25da8118e2885427e2f907e0c3f..5cc1c162044fc4f40b15c351cd170ce2c58703f7 100644 (file)
@@ -429,7 +429,10 @@ static u64 sched_slice(struct cfs_rq *cfs_rq, struct sched_entity *se)
        u64 slice = __sched_period(cfs_rq->nr_running + !se->on_rq);
 
        for_each_sched_entity(se) {
-               struct load_weight *load = &cfs_rq->load;
+               struct load_weight *load;
+
+               cfs_rq = cfs_rq_of(se);
+               load = &cfs_rq->load;
 
                if (unlikely(!se->on_rq)) {
                        struct load_weight lw = cfs_rq->load;