aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/cpumask.h
diff options
context:
space:
mode:
authorPeter Zijlstra (Intel) <peterz@infradead.org>2016-03-10 06:54:08 -0500
committerThomas Gleixner <tglx@linutronix.de>2016-05-06 08:58:22 -0400
commite9d867a67fd03ccc07248ca4e9c2f74fed494d5b (patch)
treebd1e01ee5b5581203d3fa8397fd863c400cea2bc /include/linux/cpumask.h
parent04974df8049fc4240d22759a91e035082ccd18b4 (diff)
sched: Allow per-cpu kernel threads to run on online && !active
In order to enable symmetric hotplug, we must mirror the online && !active state of cpu-down on the cpu-up side. However, to retain sanity, limit this state to per-cpu kthreads. Aside from the change to set_cpus_allowed_ptr(), which allow moving the per-cpu kthreads on, the other critical piece is the cpu selection for pinned tasks in select_task_rq(). This avoids dropping into select_fallback_rq(). select_fallback_rq() cannot be allowed to select !active cpus because its used to migrate user tasks away. And we do not want to move user tasks onto cpus that are in transition. Requested-by: Thomas Gleixner <tglx@linutronix.de> Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org> Tested-by: Thomas Gleixner <tglx@linutronix.de> Cc: Lai Jiangshan <laijs@cn.fujitsu.com> Cc: Jan H. Schönherr <jschoenh@amazon.de> Cc: Oleg Nesterov <oleg@redhat.com> Cc: rt@linutronix.de Link: http://lkml.kernel.org/r/20160301152303.GV6356@twins.programming.kicks-ass.net Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Diffstat (limited to 'include/linux/cpumask.h')
-rw-r--r--include/linux/cpumask.h6
1 files changed, 2 insertions, 4 deletions
diff --git a/include/linux/cpumask.h b/include/linux/cpumask.h
index 40cee6b77a93..e828cf65d7df 100644
--- a/include/linux/cpumask.h
+++ b/include/linux/cpumask.h
@@ -743,12 +743,10 @@ set_cpu_present(unsigned int cpu, bool present)
743static inline void 743static inline void
744set_cpu_online(unsigned int cpu, bool online) 744set_cpu_online(unsigned int cpu, bool online)
745{ 745{
746 if (online) { 746 if (online)
747 cpumask_set_cpu(cpu, &__cpu_online_mask); 747 cpumask_set_cpu(cpu, &__cpu_online_mask);
748 cpumask_set_cpu(cpu, &__cpu_active_mask); 748 else
749 } else {
750 cpumask_clear_cpu(cpu, &__cpu_online_mask); 749 cpumask_clear_cpu(cpu, &__cpu_online_mask);
751 }
752} 750}
753 751
754static inline void 752static inline void