From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from galois.linutronix.de (Galois.linutronix.de [193.142.43.55]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 08701257827 for ; Sun, 16 Nov 2025 20:48:36 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=193.142.43.55 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1763326118; cv=none; b=TY5/m+01l8sRj+d+WDOZpJiPguJK2zdp1kR8lOPtiy+aQIzasALu+8pakI7ZG8ShyM1+PGUzNwO3ylF96hHJorJ4k+tpVEq8F+RCRW7ssZJo0E8G42mfUctPHSOcTkpyCo+2TC4eW3qouTXwfS2Mxbf1xPBdRB2TBcNU9lVV2hA= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1763326118; c=relaxed/simple; bh=TcahkKbX39zOr8+PgBzZO+sZLXW0xZk+33Tp7XnkqFo=; h=Message-ID:From:To:Cc:Subject:Date; b=sPdnrM8Jb8c11KQkOoTTzLuaZcXn4EKE8qtgH3cG7W0O5BaKKMsgrS1jlM1Xrh941/V0BhRjrQmiTKt0LNI6AmqSnCZd683gBjAfETwnT2SITi01SbGKc9m2Zz5SPqKf0g57Mo/dmil0CuNBR4dXDTChVeVLZlZm7iZZpUIF5Hc= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linutronix.de; spf=pass smtp.mailfrom=linutronix.de; dkim=pass (2048-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=M9i6zZ79; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=j7PX5HoP; arc=none smtp.client-ip=193.142.43.55 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linutronix.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linutronix.de Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="M9i6zZ79"; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="j7PX5HoP" Message-ID: <20251104075053.700034556@linutronix.de> DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1763326114; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc; bh=PaaCyhPtnVkvHFYGfuGXvNtPRSdlu1XL8l1jsLAZVK0=; b=M9i6zZ796LgD2SR1xiKdj3C/urQiS73pkZu5F2emwj4ysnHLcl0P31bHjnkwWRNZ7iqwfT XgT3XcTrNHyJ6jUfgmesu5UtC10Xdu2qY891HnkSuld7tLDGTF+JUHQLmTg2JuZK+5FA8W cQd+lCykDWbAYqhTT2awqxRgkydx/uxPDmBp9aHKsaytJJVly1h0A486gw5t+Dn9TrYqn/ hcX415t1shioINBFsfxGIa17KDNHCo5Hz9qID58jRfTFAaDwSy1nYzo0L+jFVae6Ipes3D LIVOLGkbDyODOEqClSIfYetnk13khE3C6fLGt+BNffkIoZHuYY/92jhSChAtUQ== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1763326114; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc; bh=PaaCyhPtnVkvHFYGfuGXvNtPRSdlu1XL8l1jsLAZVK0=; b=j7PX5HoPV76ELajJRmc4BPQ6Z/MYsTP1qKpumfWgn8g/2KFet1fwhkwUpBfVCNeDSehydk 2r3S7ist41M5PXBA== From: Thomas Gleixner To: LKML Cc: Peter Zijlstra , Gabriele Monaco , Mathieu Desnoyers , Michael Jeanson , Jens Axboe , "Paul E. McKenney" , "Gautham R. Shenoy" , Florian Weimer , Tim Chen , Yury Norov , Shrikanth Hegde Subject: [patch V4 00/20] sched: Rewrite MM CID management Date: Sun, 16 Nov 2025 21:48:33 +0100 (CET) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: This is a follow up on V3 series which can be found here: https://lore.kernel.org/20251029123717.886619142@linutronix.de The V1 cover letter contains a detailed analyisis of the issues: https://lore.kernel.org/20251015164952.694882104@linutronix.de 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@linutronix.de 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(-)