Skip to content

Commit

Permalink
sched: sched_slice() fixlet
Browse files Browse the repository at this point in the history
Mike's change: 0a58244 "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>
  • Loading branch information
Lin Ming authored and Ingo Molnar committed Jan 15, 2009
1 parent e17036d commit 6272d68
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion kernel/sched_fair.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 6272d68

Please sign in to comment.