Commit e1d4eeec authored by Nicolas Pitre's avatar Nicolas Pitre Committed by Ingo Molnar

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: default avatarNicolas Pitre <>
Cc: Linus Torvalds <>
Cc: Peter Zijlstra <>
Cc: Thomas Gleixner <>
Link: default avatarIngo Molnar <>
parent 387bc8b5
......@@ -1156,6 +1156,7 @@ config CGROUP_HUGETLB
config CPUSETS
bool "Cpuset controller"
depends on SMP
This option will let you create and manage CPUSETs which
allow dynamically partitioning a system into sets of CPUs and
......@@ -5451,6 +5451,8 @@ void init_idle(struct task_struct *idle, int cpu)
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;
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,
return ret;
bool sched_smp_initialized __read_mostly;
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment