summaryrefslogtreecommitdiffstats
path: root/kernel/cred.c
diff options
context:
space:
mode:
authorPeter Zijlstra <peterz@infradead.org>2021-01-12 11:28:16 +0100
committerPeter Zijlstra <peterz@infradead.org>2021-01-22 15:09:44 +0100
commit5ba2ffba13a1e24e7b153683e97300f9cc6f605a (patch)
treebe28af13dc3875ad13e20dd867f59b2ad4865412 /kernel/cred.c
parentsched: Prepare to use balance_push in ttwu() (diff)
downloadlinux-5ba2ffba13a1e24e7b153683e97300f9cc6f605a.tar.xz
linux-5ba2ffba13a1e24e7b153683e97300f9cc6f605a.zip
sched: Fix CPU hotplug / tighten is_per_cpu_kthread()
Prior to commit 1cf12e08bc4d ("sched/hotplug: Consolidate task migration on CPU unplug") we'd leave any task on the dying CPU and break affinity and force them off at the very end. This scheme had to change in order to enable migrate_disable(). One cannot wait for migrate_disable() to complete while stuck in stop_machine(). Furthermore, since we need at the very least: idle, hotplug and stop threads at any point before stop_machine, we can't break affinity and/or push those away. Under the assumption that all per-cpu kthreads are sanely handled by CPU hotplug, the new code no long breaks affinity or migrates any of them (which then includes the critical ones above). However, there's an important difference between per-cpu kthreads and kthreads that happen to have a single CPU affinity which is lost. The latter class very much relies on the forced affinity breaking and migration semantics previously provided. Use the new kthread_is_per_cpu() infrastructure to tighten is_per_cpu_kthread() and fix the hot-unplug problems stemming from the change. Fixes: 1cf12e08bc4d ("sched/hotplug: Consolidate task migration on CPU unplug") Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org> Reviewed-by: Valentin Schneider <valentin.schneider@arm.com> Tested-by: Valentin Schneider <valentin.schneider@arm.com> Link: https://lkml.kernel.org/r/20210121103507.102416009@infradead.org
Diffstat (limited to 'kernel/cred.c')
0 files changed, 0 insertions, 0 deletions