]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
sched/isolation: Eliminate NO_HZ_FULL_ALL
authorPaul E. McKenney <paulmck@linux.vnet.ibm.com>
Thu, 30 Nov 2017 23:36:35 +0000 (15:36 -0800)
committerPaul E. McKenney <paulmck@linux.vnet.ibm.com>
Thu, 15 Feb 2018 23:40:37 +0000 (15:40 -0800)
Commit 6f1982fedd59 ("sched/isolation: Handle the nohz_full= parameter")
broke CONFIG_NO_HZ_FULL_ALL=y kernels.  This breakage is due to the code
under CONFIG_NO_HZ_FULL_ALL failing to invoke the shiny new housekeeping
functions.  This means that rcutorture scenario TREE04 now emits RCU CPU
stall warnings due to the RCU grace-period kthreads not being awakened
at a time of their choosing, or perhaps even not at all:

[   27.731422] rcu_bh kthread starved for 21001 jiffies! g18446744073709551369 c18446744073709551368 f0x0 RCU_GP_WAIT_FQS(3) ->state=0x402 ->cpu=3
[   27.731423] rcu_bh          I14936     9      2 0x80080000
[   27.731435] Call Trace:
[   27.731440]  __schedule+0x31a/0x6d0
[   27.731442]  schedule+0x31/0x80
[   27.731446]  schedule_timeout+0x15a/0x320
[   27.731453]  ? call_timer_fn+0x130/0x130
[   27.731457]  rcu_gp_kthread+0x66c/0xea0
[   27.731458]  ? rcu_gp_kthread+0x66c/0xea0

Because no one has complained about CONFIG_NO_HZ_FULL_ALL=y being broken,
I hypothesize that no one is in fact using it, other than rcutorture.
This commit therefore eliminates CONFIG_NO_HZ_FULL_ALL and updates
rcutorture's config files to instead use the nohz_full= kernel parameter
to put the desired CPUs into nohz_full mode.

Fixes: 6f1982fedd59 ("sched/isolation: Handle the nohz_full= parameter")
Reported-by: kernel test robot <xiaolong.ye@intel.com>
Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Cc: Frederic Weisbecker <frederic@kernel.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Chris Metcalf <cmetcalf@mellanox.com>
Cc: Christoph Lameter <cl@linux.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Luiz Capitulino <lcapitulino@redhat.com>
Cc: Mike Galbraith <efault@gmx.de>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Rik van Riel <riel@redhat.com>
Cc: Wanpeng Li <kernellwp@gmail.com>
Cc: Ingo Molnar <mingo@kernel.org>
Cc: John Stultz <john.stultz@linaro.org>
Cc: Jonathan Corbet <corbet@lwn.net>
Documentation/timers/NO_HZ.txt
kernel/time/Kconfig
kernel/time/tick-sched.c
tools/testing/selftests/rcutorture/configs/rcu/TASKS03
tools/testing/selftests/rcutorture/configs/rcu/TASKS03.boot
tools/testing/selftests/rcutorture/configs/rcu/TREE04
tools/testing/selftests/rcutorture/configs/rcu/TREE04.boot
tools/testing/selftests/rcutorture/configs/rcu/TREE07

index 2dcaf9adb7a75d3e80ced6dd7edab52a0c181915..9591092da5e03739fb49aee8f0fd95807028383e 100644 (file)
@@ -131,13 +131,6 @@ error message, and the boot CPU will be removed from the mask.  Note that
 this means that your system must have at least two CPUs in order for
 CONFIG_NO_HZ_FULL=y to do anything for you.
 
-Alternatively, the CONFIG_NO_HZ_FULL_ALL=y Kconfig parameter specifies
-that all CPUs other than the boot CPU are adaptive-ticks CPUs.  This
-Kconfig parameter will be overridden by the "nohz_full=" boot parameter,
-so that if both the CONFIG_NO_HZ_FULL_ALL=y Kconfig parameter and
-the "nohz_full=1" boot parameter is specified, the boot parameter will
-prevail so that only CPU 1 will be an adaptive-ticks CPU.
-
 Finally, adaptive-ticks CPUs must have their RCU callbacks offloaded.
 This is covered in the "RCU IMPLICATIONS" section below.
 
index f6b5f19223d6cb78efb3179f6dc0fd15383aeded..78eabc41eaa699688a2e4e6a2643fa571bdd8cfe 100644 (file)
@@ -113,16 +113,6 @@ config NO_HZ_FULL
 
 endchoice
 
-config NO_HZ_FULL_ALL
-       bool "Full dynticks system on all CPUs by default (except CPU 0)"
-       depends on NO_HZ_FULL
-       help
-         If the user doesn't pass the nohz_full boot option to
-        define the range of full dynticks CPUs, consider that all
-        CPUs in the system are full dynticks by default.
-        Note the boot CPU will still be kept outside the range to
-        handle the timekeeping duty.
-
 config NO_HZ
        bool "Old Idle dynticks config"
        depends on !ARCH_USES_GETTIMEOFFSET && GENERIC_CLOCKEVENTS
index 29a5733eff83ec9e40432a2e9353bf19253d10b7..ccd3782da0bf65f485d426845a4aaf6435bc0391 100644 (file)
@@ -405,30 +405,12 @@ static int tick_nohz_cpu_down(unsigned int cpu)
        return 0;
 }
 
-static int tick_nohz_init_all(void)
-{
-       int err = -1;
-
-#ifdef CONFIG_NO_HZ_FULL_ALL
-       if (!alloc_cpumask_var(&tick_nohz_full_mask, GFP_KERNEL)) {
-               WARN(1, "NO_HZ: Can't allocate full dynticks cpumask\n");
-               return err;
-       }
-       err = 0;
-       cpumask_setall(tick_nohz_full_mask);
-       tick_nohz_full_running = true;
-#endif
-       return err;
-}
-
 void __init tick_nohz_init(void)
 {
        int cpu, ret;
 
-       if (!tick_nohz_full_running) {
-               if (tick_nohz_init_all() < 0)
-                       return;
-       }
+       if (!tick_nohz_full_running)
+               return;
 
        /*
         * Full dynticks uses irq work to drive the tick rescheduling on safe
index c70c51d5ded15af901e1a2c267b144a9cc88ba4d..28568b72a31b8342b1e127dea4a796294e0fc939 100644 (file)
@@ -9,5 +9,4 @@ CONFIG_PREEMPT=y
 CONFIG_HZ_PERIODIC=n
 CONFIG_NO_HZ_IDLE=n
 CONFIG_NO_HZ_FULL=y
-CONFIG_NO_HZ_FULL_ALL=y
 #CHECK#CONFIG_RCU_EXPERT=n
index cd2a188eeb6d986034e40d91359341944a1d2716..838297c583188d6815e57dbc89a5e5836dd06e21 100644 (file)
@@ -1 +1 @@
-rcutorture.torture_type=tasks
+rcutorture.torture_type=tasks nohz_full=1
index 27d22695d64c0b00204a7009a624fde03a17ba35..24c9f6012e354a9c8a46494cbf5c4b8135d5d9ea 100644 (file)
@@ -7,7 +7,6 @@ CONFIG_PREEMPT=n
 CONFIG_HZ_PERIODIC=n
 CONFIG_NO_HZ_IDLE=n
 CONFIG_NO_HZ_FULL=y
-CONFIG_NO_HZ_FULL_ALL=y
 CONFIG_RCU_FAST_NO_HZ=y
 CONFIG_RCU_TRACE=y
 CONFIG_HOTPLUG_CPU=n
index e34c334304472987f912f22453179c60dd88e46e..e6071bb96c7dbdb5145370a16957505804f05acf 100644 (file)
@@ -1 +1 @@
-rcutorture.torture_type=rcu_bh rcutree.rcu_fanout_leaf=4
+rcutorture.torture_type=rcu_bh rcutree.rcu_fanout_leaf=4 nohz_full=1-7
index 0f4759f4232ec8d366cbb39653072127d46c6aaf..d7afb271a586d320dee65f07cf06290f02da5e84 100644 (file)
@@ -7,7 +7,6 @@ CONFIG_PREEMPT=n
 CONFIG_HZ_PERIODIC=n
 CONFIG_NO_HZ_IDLE=n
 CONFIG_NO_HZ_FULL=y
-CONFIG_NO_HZ_FULL_ALL=n
 CONFIG_RCU_FAST_NO_HZ=n
 CONFIG_RCU_TRACE=y
 CONFIG_HOTPLUG_CPU=y