diff options
author | Nicolas Pitre <nicolas.pitre@linaro.org> | 2017-06-14 13:19:23 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@kernel.org> | 2017-06-23 10:46:44 +0200 |
commit | e1d4eeec5aaa28d25f249c0195b0e1d9b9feb7bd (patch) | |
tree | aef30c8669d5220465593bb4e0d06d276ce015fc /kernel | |
parent | 387bc8b5536eeb0a92f4b4ab553539eaea2ac0ba (diff) | |
download | op-kernel-dev-e1d4eeec5aaa28d25f249c0195b0e1d9b9feb7bd.zip op-kernel-dev-e1d4eeec5aaa28d25f249c0195b0e1d9b9feb7bd.tar.gz |
sched/cpuset: Only offer CONFIG_CPUSETS if SMP is enabled
Make CONFIG_CPUSETS=y depend on SMP as this feature makes no sense
on UP. This allows for configuring out cpuset_cpumask_can_shrink()
and task_can_attach() entirely, which shrinks the kernel a bit.
Signed-off-by: Nicolas Pitre <nico@linaro.org>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Link: http://lkml.kernel.org/r/20170614171926.8345-2-nicolas.pitre@linaro.org
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'kernel')
-rw-r--r-- | kernel/sched/core.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/kernel/sched/core.c b/kernel/sched/core.c index 62166da..7faf4b3 100644 --- a/kernel/sched/core.c +++ b/kernel/sched/core.c @@ -5451,6 +5451,8 @@ void init_idle(struct task_struct *idle, int cpu) #endif } +#ifdef CONFIG_SMP + int cpuset_cpumask_can_shrink(const struct cpumask *cur, const struct cpumask *trial) { @@ -5494,7 +5496,6 @@ int task_can_attach(struct task_struct *p, goto out; } -#ifdef CONFIG_SMP if (dl_task(p) && !cpumask_intersects(task_rq(p)->rd->span, cs_cpus_allowed)) { unsigned int dest_cpu = cpumask_any_and(cpu_active_mask, @@ -5524,13 +5525,11 @@ int task_can_attach(struct task_struct *p, rcu_read_unlock_sched(); } -#endif + out: return ret; } -#ifdef CONFIG_SMP - bool sched_smp_initialized __read_mostly; #ifdef CONFIG_NUMA_BALANCING |