]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
sched/mmcid: Serialize sched_mm_cid_fork()/exit() with a mutex
authorThomas Gleixner <tglx@linutronix.de>
Wed, 19 Nov 2025 17:27:11 +0000 (18:27 +0100)
committerThomas Gleixner <tglx@linutronix.de>
Tue, 25 Nov 2025 18:45:41 +0000 (19:45 +0100)
commit51dd92c71a38647803478fb81e1812286a8998b1
tree9307edac0d7b5e58d362cffe824bc726c2103113
parentb0c3d51b54f8a4f4c809432d210c0c983d5cd97e
sched/mmcid: Serialize sched_mm_cid_fork()/exit() with a mutex

Prepare for the new CID management scheme which puts the CID ownership
transition into the fork() and exit() slow path by serializing
sched_mm_cid_fork()/exit() with it, so task list and cpu mask walks can be
done in interruptible and preemptible code.

The contention on it is not worse than on other concurrency controls in the
fork()/exit() machinery.

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/20251119172549.895826703@linutronix.de
include/linux/rseq_types.h
kernel/sched/core.c