Patch "cpumask: limit FORCE_NR_CPUS to just the UP case" has been added to the 6.9-stable tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is a note to let you know that I've just added the patch titled

    cpumask: limit FORCE_NR_CPUS to just the UP case

to the 6.9-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     cpumask-limit-force_nr_cpus-to-just-the-up-case.patch
and it can be found in the queue-6.9 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.



commit 7eb015c2836ccc1d28120713bea87fd0de73d896
Author: Linus Torvalds <torvalds@xxxxxxxxxxxxxxxxxxxx>
Date:   Tue Jun 18 09:00:04 2024 -0700

    cpumask: limit FORCE_NR_CPUS to just the UP case
    
    [ Upstream commit 5d272dd1b3430bb31fa30042490fa081512424e4 ]
    
    Hardcoding the number of CPUs at compile time does improve code
    generation, but if you get it wrong the result will be confusion.
    
    We already limited this earlier to only "experts" (see commit
    fe5759d5bfda "cpumask: limit visibility of FORCE_NR_CPUS"), but with
    distro kernel configs often having EXPERT enabled, that turns out to not
    be much of a limit.
    
    To quote the philosophers at Disney: "Everyone can be an expert. And
    when everyone's an expert, no one will be".
    
    There's a runtime warning if you then set nr_cpus to anything but the
    forced number, but apparently that can be ignored too [1] and by then
    it's pretty much too late anyway.
    
    If we had some real way to limit this to "embedded only", maybe it would
    be worth it, but let's see if anybody even notices that the option is
    gone.  We need to simplify kernel configuration anyway.
    
    Link: https://lore.kernel.org/all/20240618105036.208a8860@xxxxxxxxxxxxxxxxxxxx/ [1]
    Reported-by: Steven Rostedt <rostedt@xxxxxxxxxxx>
    Cc: Masami Hiramatsu <mhiramat@xxxxxxxxxx>
    Cc: Mark Rutland <mark.rutland@xxxxxxx>
    Cc: Mathieu Desnoyers <mathieu.desnoyers@xxxxxxxxxxxx>
    Cc: Paul McKenney <paulmck@xxxxxxxxxx>
    Cc: Thomas Gleixner <tglx@xxxxxxxxxxxxx>
    Cc: Peter Zijlstra <peterz@xxxxxxxxxxxxx>
    Cc: Yury Norov <yury.norov@xxxxxxxxx>
    Signed-off-by: Linus Torvalds <torvalds@xxxxxxxxxxxxxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/lib/Kconfig b/lib/Kconfig
index 4557bb8a52565..c98e11c7330ec 100644
--- a/lib/Kconfig
+++ b/lib/Kconfig
@@ -539,13 +539,7 @@ config CPUMASK_OFFSTACK
 	  stack overflow.
 
 config FORCE_NR_CPUS
-       bool "Set number of CPUs at compile time"
-       depends on SMP && EXPERT && !COMPILE_TEST
-       help
-         Say Yes if you have NR_CPUS set to an actual number of possible
-         CPUs in your system, not to a default value. This forces the core
-         code to rely on compile-time value and optimize kernel routines
-         better.
+	def_bool !SMP
 
 config CPU_RMAP
 	bool




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux