]> git.ipfire.org Git - thirdparty/linux.git/commit
sched/mmcid: Implement deferred mode change
authorThomas Gleixner <tglx@linutronix.de>
Wed, 19 Nov 2025 17:27:20 +0000 (18:27 +0100)
committerThomas Gleixner <tglx@linutronix.de>
Tue, 25 Nov 2025 18:45:42 +0000 (19:45 +0100)
commit9da6ccbcea3de1fa704202e3346fe6c0226bfc18
treeb369894a119f091b00be2f1d67722404f40e402a
parentc809f081fe400cb1b9898f4791c0d33146315161
sched/mmcid: Implement deferred mode change

When affinity changes cause an increase of the number of CPUs allowed for
tasks which are related to a MM, that might results in a situation where
the ownership mode can go back from per CPU mode to per task mode.

As affinity changes happen with runqueue lock held there is no way to do
the actual mode change and required fixup right there.

Add the infrastructure to defer it to a workqueue. The scheduled work can
race with a fork() or exit(). Whatever happens first takes care of it.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Reviewed-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Link: https://patch.msgid.link/20251119172550.216484739@linutronix.de
include/linux/rseq_types.h
kernel/sched/core.c