[patch V4 00/20] sched: Rewrite MM CID management

From: Thomas Gleixner
Date: Sun Nov 16 2025 - 15:50:47 EST


This is a follow up on V3 series which can be found here:

https://lore.kernel.org/20251029123717.886619142@xxxxxxxxxxxxx

The V1 cover letter contains a detailed analyisis of the issues:

https://lore.kernel.org/20251015164952.694882104@xxxxxxxxxxxxx

TLDR: The CID management is way to complex and adds significant overhead
into scheduler hotpaths.

The series rewrites MM CID management in a more simplistic way which
focusses on low overhead in the scheduler while maintaining per task CIDs
as long as the number of threads is not exceeding the number of possible
CPUs.

The series is based on the V6 series of the rseq rewrite:

https://lore.kernel.org/20251027084220.785525188@xxxxxxxxxxxxx

which is also available from git:

git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git core/rseq

The series on top of the tip core/rseq branch is available from git as
well:

git://git.kernel.org/pub/scm/linux/kernel/git/tglx/devel.git rseq/cid

Changes vs. V3:

- Zero the bitmap correctly

- Fix an off by one in a transition function

- Address review comments (mostly typos)

- Picked up Reviewed/Acked-by tags where appropriate

Thanks,

tglx
---
include/linux/bitmap.h | 15
include/linux/cpumask.h | 26 +
include/linux/irq_work.h | 9
include/linux/irq_work_types.h | 14
include/linux/mm_types.h | 128 ------
include/linux/rseq.h | 27 -
include/linux/rseq_types.h | 71 +++
include/linux/sched.h | 19
init/init_task.c | 3
kernel/cpu.c | 19
kernel/exit.c | 1
kernel/fork.c | 7
kernel/sched/core.c | 815 +++++++++++++++++++----------------------
kernel/sched/sched.h | 395 ++++++++-----------
kernel/signal.c | 2
lib/bitmap.c | 6
16 files changed, 733 insertions(+), 824 deletions(-)