sched: Migrate disable support
From: | Peter Zijlstra <peterz-AT-infradead.org> | |
To: | tglx-AT-linutronix.de, mingo-AT-kernel.org | |
Subject: | [PATCH 0/9] sched: Migrate disable support | |
Date: | Mon, 21 Sep 2020 18:35:57 +0200 | |
Message-ID: | <20200921163557.234036895@infradead.org> | |
Cc: | linux-kernel-AT-vger.kernel.org, bigeasy-AT-linutronix.de, qais.yousef-AT-arm.com, swood-AT-redhat.com, peterz-AT-infradead.org, valentin.schneider-AT-arm.com, juri.lelli-AT-redhat.com, vincent.guittot-AT-linaro.org, dietmar.eggemann-AT-arm.com, rostedt-AT-goodmis.org, bsegall-AT-google.com, mgorman-AT-suse.de, bristot-AT-redhat.com, vincent.donnefort-AT-arm.com | |
Archive-link: | Article |
Hi, Here's my take on migrate_disable(). It avoids growing a second means of changing the affinity, documents how the things violates locking rules but still mostly works. It also avoids blocking completely, so no more futex band-aids required. Also, no more atomics/locks on the fast path. I also put in a comment that explains how the whole concept is fundamentally flawed but a necessary evil to get PREEMPT_RT going -- for now. Somewhat tested with PREEMPT_RT. --- include/linux/cpuhotplug.h | 1 include/linux/preempt.h | 60 +++ include/linux/sched.h | 4 include/linux/sched/hotplug.h | 2 include/linux/stop_machine.h | 5 kernel/cpu.c | 9 kernel/sched/core.c | 673 +++++++++++++++++++++++++++++++----------- kernel/sched/deadline.c | 5 kernel/sched/sched.h | 24 + kernel/stop_machine.c | 23 + lib/dump_stack.c | 2 lib/smp_processor_id.c | 5 12 files changed, 635 insertions(+), 178 deletions(-)