summaryrefslogtreecommitdiffstats
path: root/kernel/sched_fair.c
diff options
context:
space:
mode:
authorRik van Riel <riel@redhat.com>2011-02-01 09:47:15 -0500
committerIngo Molnar <mingo@elte.hu>2011-02-03 14:20:32 +0100
commit725e7580aaf98e9f7b22b8ccfc640ad0c09e2b08 (patch)
tree8717e0fce19f74509ac1dffa91be95c3ef76c1e5 /kernel/sched_fair.c
parent6ea72f12069306b235151c5b05ac0cca7e1dedfa (diff)
downloadblackbird-op-linux-725e7580aaf98e9f7b22b8ccfc640ad0c09e2b08.tar.gz
blackbird-op-linux-725e7580aaf98e9f7b22b8ccfc640ad0c09e2b08.zip
sched: Check the right ->nr_running in yield_task_fair()
With CONFIG_FAIR_GROUP_SCHED, each task_group has its own cfs_rq. Yielding to a task from another cfs_rq may be worthwhile, since a process calling yield typically cannot use the CPU right now. Therefor, we want to check the per-cpu nr_running, not the cgroup local one. Signed-off-by: Rik van Riel <riel@redhat.com> Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl> LKML-Reference: <20110201094715.798c4f86@annuminas.surriel.com> Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'kernel/sched_fair.c')
-rw-r--r--kernel/sched_fair.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/kernel/sched_fair.c b/kernel/sched_fair.c
index 55040f3938d8..4de9905228c4 100644
--- a/kernel/sched_fair.c
+++ b/kernel/sched_fair.c
@@ -1331,7 +1331,7 @@ static void yield_task_fair(struct rq *rq)
/*
* Are we the only task in the tree?
*/
- if (unlikely(cfs_rq->nr_running == 1))
+ if (unlikely(rq->nr_running == 1))
return;
clear_buddies(cfs_rq, se);
OpenPOWER on IntegriCloud