diff options
author | Peter Zijlstra <a.p.zijlstra@chello.nl> | 2010-03-10 11:07:24 -0500 |
---|---|---|
committer | Thomas Gleixner <tglx@linutronix.de> | 2010-03-21 06:30:47 -0400 |
commit | 318e45ed545c213617c9fc9a336893d7ee9fd55b (patch) | |
tree | 411889ca71edba0ef56e6bf6276c0aedfed4949d | |
parent | 6d79084c4118ae1d5b85734aad844869f53e3a6d (diff) |
sched: Fix pick_next_highest_task_rt() for cgroups
Upstream commit: 3d07467b7aa91623b31d7b5888a123a2c8c8e9cc
Since pick_next_highest_task_rt() already iterates all the cgroups and
is really only interested in tasks, skip over the !task entries.
Reported-by: Dhaval Giani <dhaval.giani@gmail.com>
Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
Tested-by: Dhaval Giani <dhaval.giani@gmail.com>
LKML-Reference: <new-submission>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
-rw-r--r-- | kernel/sched_rt.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/kernel/sched_rt.c b/kernel/sched_rt.c index 9de5f18b92bf..6a0029a18259 100644 --- a/kernel/sched_rt.c +++ b/kernel/sched_rt.c | |||
@@ -1207,7 +1207,12 @@ static struct task_struct *pick_next_highest_task_rt(struct rq *rq, int cpu) | |||
1207 | if (next && next->prio < idx) | 1207 | if (next && next->prio < idx) |
1208 | continue; | 1208 | continue; |
1209 | list_for_each_entry(rt_se, array->queue + idx, run_list) { | 1209 | list_for_each_entry(rt_se, array->queue + idx, run_list) { |
1210 | struct task_struct *p = rt_task_of(rt_se); | 1210 | struct task_struct *p; |
1211 | |||
1212 | if (!rt_entity_is_task(rt_se)) | ||
1213 | continue; | ||
1214 | |||
1215 | p = rt_task_of(rt_se); | ||
1211 | if (pick_rt_task(rq, p, cpu)) { | 1216 | if (pick_rt_task(rq, p, cpu)) { |
1212 | next = p; | 1217 | next = p; |
1213 | break; | 1218 | break; |