aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/sched_rt.c
diff options
context:
space:
mode:
authorPeter Zijlstra <peterz@infradead.org>2011-06-16 06:23:22 -0400
committerIngo Molnar <mingo@elte.hu>2011-10-06 06:46:56 -0400
commitfa17b507f142d37aeac322a95f6f7c6375f25601 (patch)
tree5ff8b9d7087175aca85dff3393932fe9b5497425 /kernel/sched_rt.c
parent6eb57e0d65ebd99a71d435dc96d83e725752eef8 (diff)
sched: Wrap scheduler p->cpus_allowed access
This task is preparatory for the migrate_disable() implementation, but stands on its own and provides a cleanup. It currently only converts those sites required for task-placement. Kosaki-san once mentioned replacing cpus_allowed with a proper cpumask_t instead of the NR_CPUS sized array it currently is, that would also require something like this. Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl> Acked-by: Thomas Gleixner <tglx@linutronix.de> Cc: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com> Link: http://lkml.kernel.org/n/tip-e42skvaddos99psip0vce41o@git.kernel.org Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'kernel/sched_rt.c')
-rw-r--r--kernel/sched_rt.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/kernel/sched_rt.c b/kernel/sched_rt.c
index 0cc188cf7664..57a10842afa1 100644
--- a/kernel/sched_rt.c
+++ b/kernel/sched_rt.c
@@ -1179,7 +1179,7 @@ static void deactivate_task(struct rq *rq, struct task_struct *p, int sleep);
1179static int pick_rt_task(struct rq *rq, struct task_struct *p, int cpu) 1179static int pick_rt_task(struct rq *rq, struct task_struct *p, int cpu)
1180{ 1180{
1181 if (!task_running(rq, p) && 1181 if (!task_running(rq, p) &&
1182 (cpu < 0 || cpumask_test_cpu(cpu, &p->cpus_allowed)) && 1182 (cpu < 0 || cpumask_test_cpu(cpu, tsk_cpus_allowed(p))) &&
1183 (p->rt.nr_cpus_allowed > 1)) 1183 (p->rt.nr_cpus_allowed > 1))
1184 return 1; 1184 return 1;
1185 return 0; 1185 return 0;
@@ -1324,7 +1324,7 @@ static struct rq *find_lock_lowest_rq(struct task_struct *task, struct rq *rq)
1324 */ 1324 */
1325 if (unlikely(task_rq(task) != rq || 1325 if (unlikely(task_rq(task) != rq ||
1326 !cpumask_test_cpu(lowest_rq->cpu, 1326 !cpumask_test_cpu(lowest_rq->cpu,
1327 &task->cpus_allowed) || 1327 tsk_cpus_allowed(task)) ||
1328 task_running(rq, task) || 1328 task_running(rq, task) ||
1329 !task->on_rq)) { 1329 !task->on_rq)) {
1330 1330