Patch "arm64: smp: Tell RCU about CPUs that fail to come online" has been added to the 5.4-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

    arm64: smp: Tell RCU about CPUs that fail to come online

to the 5.4-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:
     arm64-smp-tell-rcu-about-cpus-that-fail-to-come-onli.patch
and it can be found in the queue-5.4 subdirectory.

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



commit bede33e3bb3f846c591b05232bf7bcf5a82e1db9
Author: Will Deacon <will@xxxxxxxxxx>
Date:   Fri Nov 6 10:25:49 2020 +0000

    arm64: smp: Tell RCU about CPUs that fail to come online
    
    [ Upstream commit 04e613ded8c26489b3e0f9101b44462f780d1a35 ]
    
    Commit ce3d31ad3cac ("arm64/smp: Move rcu_cpu_starting() earlier") ensured
    that RCU is informed early about incoming CPUs that might end up calling
    into printk() before they are online. However, if such a CPU fails the
    early CPU feature compatibility checks in check_local_cpu_capabilities(),
    then it will be powered off or parked without informing RCU, leading to
    an endless stream of stalls:
    
      | rcu: INFO: rcu_preempt detected stalls on CPUs/tasks:
      | rcu:        2-O...: (0 ticks this GP) idle=002/1/0x4000000000000000 softirq=0/0 fqs=2593
      | (detected by 0, t=5252 jiffies, g=9317, q=136)
      | Task dump for CPU 2:
      | task:swapper/2       state:R  running task     stack:    0 pid:    0 ppid:     1 flags:0x00000028
      | Call trace:
      | ret_from_fork+0x0/0x30
    
    Ensure that the dying CPU invokes rcu_report_dead() prior to being powered
    off or parked.
    
    Cc: Qian Cai <cai@xxxxxxxxxx>
    Cc: "Paul E. McKenney" <paulmck@xxxxxxxxxx>
    Reviewed-by: Paul E. McKenney <paulmck@xxxxxxxxxx>
    Suggested-by: Qian Cai <cai@xxxxxxxxxx>
    Link: https://lore.kernel.org/r/20201105222242.GA8842@willie-the-truck
    Link: https://lore.kernel.org/r/20201106103602.9849-3-will@xxxxxxxxxx
    Signed-off-by: Will Deacon <will@xxxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/arch/arm64/kernel/smp.c b/arch/arm64/kernel/smp.c
index 426409e0d0713..987220ac4cfef 100644
--- a/arch/arm64/kernel/smp.c
+++ b/arch/arm64/kernel/smp.c
@@ -388,6 +388,7 @@ void cpu_die_early(void)
 
 	/* Mark this CPU absent */
 	set_cpu_present(cpu, 0);
+	rcu_report_dead(cpu);
 
 #ifdef CONFIG_HOTPLUG_CPU
 	update_cpu_boot_status(CPU_KILL_ME);
diff --git a/kernel/rcu/tree.c b/kernel/rcu/tree.c
index 62e59596a30a0..1b1d2b09efa9b 100644
--- a/kernel/rcu/tree.c
+++ b/kernel/rcu/tree.c
@@ -3157,7 +3157,6 @@ void rcu_cpu_starting(unsigned int cpu)
 	smp_mb(); /* Ensure RCU read-side usage follows above initialization. */
 }
 
-#ifdef CONFIG_HOTPLUG_CPU
 /*
  * The outgoing function has no further need of RCU, so remove it from
  * the rcu_node tree's ->qsmaskinitnext bit masks.
@@ -3197,6 +3196,7 @@ void rcu_report_dead(unsigned int cpu)
 	per_cpu(rcu_cpu_started, cpu) = 0;
 }
 
+#ifdef CONFIG_HOTPLUG_CPU
 /*
  * The outgoing CPU has just passed through the dying-idle state, and we
  * are being invoked from the CPU that was IPIed to continue the offline



[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