lkml.org 
[lkml]   [2024]   [Feb]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH printk v2 25/26] rcu: Mark emergency section in rcu stalls
Date
Mark an emergency section within print_other_cpu_stall(), where
RCU stall information is printed. In this section, the CPU will
not perform console output for the printk() calls. Instead, a
flushing of the console output is triggered when exiting the
emergency section.

Signed-off-by: John Ogness <john.ogness@linutronix.de>
---
kernel/rcu/tree_stall.h | 5 +++++
1 file changed, 5 insertions(+)

diff --git a/kernel/rcu/tree_stall.h b/kernel/rcu/tree_stall.h
index ac8e86babe44..efb2be8939a2 100644
--- a/kernel/rcu/tree_stall.h
+++ b/kernel/rcu/tree_stall.h
@@ -9,6 +9,7 @@

#include <linux/kvm_para.h>
#include <linux/rcu_notifier.h>
+#include <linux/console.h>

//////////////////////////////////////////////////////////////////////////////
//
@@ -604,6 +605,8 @@ static void print_other_cpu_stall(unsigned long gp_seq, unsigned long gps)
if (rcu_stall_is_suppressed())
return;

+ nbcon_cpu_emergency_enter();
+
/*
* OK, time to rat on our buddy...
* See Documentation/RCU/stallwarn.rst for info on how to debug
@@ -658,6 +661,8 @@ static void print_other_cpu_stall(unsigned long gp_seq, unsigned long gps)
panic_on_rcu_stall();

rcu_force_quiescent_state(); /* Kick them all. */
+
+ nbcon_cpu_emergency_exit();
}

static void print_cpu_stall(unsigned long gps)
--
2.39.2

\
 
 \ /
  Last update: 2024-05-27 15:09    [W:0.157 / U:0.840 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site