sched/core: Make migrate disable and CPU hotplug cooperative
authorThomas Gleixner <tglx@linutronix.de>
Wed, 26 Aug 2020 12:08:10 +0000 (14:08 +0200)
committerPeter Zijlstra <peterz@infradead.org>
Tue, 10 Nov 2020 17:39:00 +0000 (18:39 +0100)
commit3015ef4b98f53fe7eba4f5f82f562c0e074d213c
treeb92f7a21849243926709a6597db774ef1f946bc5
parent6d337eab041d56bb8f0e7794f39906c21054c512
sched/core: Make migrate disable and CPU hotplug cooperative

On CPU unplug tasks which are in a migrate disabled region cannot be pushed
to a different CPU until they returned to migrateable state.

Account the number of tasks on a runqueue which are in a migrate disabled
section and make the hotplug wait mechanism respect that.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Reviewed-by: Valentin Schneider <valentin.schneider@arm.com>
Reviewed-by: Daniel Bristot de Oliveira <bristot@redhat.com>
Link: https://lkml.kernel.org/r/20201023102347.067278757@infradead.org
kernel/sched/core.c
kernel/sched/sched.h