diff options
author | Thomas Gleixner <tglx@linutronix.de> | 2016-05-11 14:23:31 +0200 |
---|---|---|
committer | Ingo Molnar <mingo@kernel.org> | 2016-05-12 09:55:36 +0200 |
commit | 50605ffbdaf6d7ccab70d4631fd8347fc78af14f (patch) | |
tree | 4da2d3c09f4af5712d72471b5bb93174dcf857cc /kernel/sched/core.c | |
parent | ade42e092b5d1fb9a77b026f019b9953d66f1573 (diff) | |
download | lwn-50605ffbdaf6d7ccab70d4631fd8347fc78af14f.tar.gz lwn-50605ffbdaf6d7ccab70d4631fd8347fc78af14f.zip |
sched/core: Provide a tsk_nr_cpus_allowed() helper
tsk_nr_cpus_allowed() is an accessor for task->nr_cpus_allowed which allows
us to change the representation of ->nr_cpus_allowed if required.
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Mike Galbraith <efault@gmx.de>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: linux-kernel@vger.kernel.org
Link: http://lkml.kernel.org/r/1462969411-17735-2-git-send-email-bigeasy@linutronix.de
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'kernel/sched/core.c')
-rw-r--r-- | kernel/sched/core.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/kernel/sched/core.c b/kernel/sched/core.c index 6f6962a356b4..404c0784b1fc 100644 --- a/kernel/sched/core.c +++ b/kernel/sched/core.c @@ -1585,7 +1585,7 @@ int select_task_rq(struct task_struct *p, int cpu, int sd_flags, int wake_flags) { lockdep_assert_held(&p->pi_lock); - if (p->nr_cpus_allowed > 1) + if (tsk_nr_cpus_allowed(p) > 1) cpu = p->sched_class->select_task_rq(p, cpu, sd_flags, wake_flags); else cpu = cpumask_any(tsk_cpus_allowed(p)); |