|
|
Log in / Subscribe / Register

sched: Rewrite MM CID management

From:  Thomas Gleixner <tglx-AT-linutronix.de>
To:  LKML <linux-kernel-AT-vger.kernel.org>
Subject:  [patch V5 00/20] sched: Rewrite MM CID management
Date:  Wed, 19 Nov 2025 18:26:43 +0100
Message-ID:  <20251119171016.815482037@linutronix.de>
Cc:  Peter Zijlstra <peterz-AT-infradead.org>, Gabriele Monaco <gmonaco-AT-redhat.com>, Mathieu Desnoyers <mathieu.desnoyers-AT-efficios.com>, Michael Jeanson <mjeanson-AT-efficios.com>, Jens Axboe <axboe-AT-kernel.dk>, "Paul E. McKenney" <paulmck-AT-kernel.org>, "Gautham R. Shenoy" <gautham.shenoy-AT-amd.com>, Florian Weimer <fweimer-AT-redhat.com>, Tim Chen <tim.c.chen-AT-intel.com>, Yury Norov <yury.norov-AT-gmail.com>, Shrikanth Hegde <sshegde-AT-linux.ibm.com>
Archive-link:  Article

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

    https://lore.kernel.org/20251104075053.700034556@linutron...

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

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

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@linutron...

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. V4:

   - Zero mm_cid::transit on init - Mathieu

   - Rephrase change logs - Mathiue

   - Picked up Reviewed/Acked-by tags

Delta patch to V4 below.

Thanks,

	tglx
---
diff --git a/kernel/sched/core.c b/kernel/sched/core.c
index 93a2523908c4..72f368f7d6e2 100644
--- a/kernel/sched/core.c
+++ b/kernel/sched/core.c
@@ -10848,6 +10848,7 @@ void mm_init_cid(struct mm_struct *mm, struct task_struct *p)
 {
 	mm->mm_cid.max_cids = 0;
 	mm->mm_cid.percpu = 0;
+	mm->mm_cid.transit = 0;
 	mm->mm_cid.nr_cpus_allowed = p->nr_cpus_allowed;
 	mm->mm_cid.users = 0;
 	mm->mm_cid.pcpu_thrs = 0;



Copyright © 2025, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds