[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20221104021224.102-1-thunder.leizhen@huawei.com>
Date: Fri, 4 Nov 2022 10:12:19 +0800
From: Zhen Lei <thunder.leizhen@...wei.com>
To: "Paul E . McKenney" <paulmck@...nel.org>,
Frederic Weisbecker <frederic@...nel.org>,
Neeraj Upadhyay <quic_neeraju@...cinc.com>,
"Josh Triplett" <josh@...htriplett.org>,
Steven Rostedt <rostedt@...dmis.org>,
Mathieu Desnoyers <mathieu.desnoyers@...icios.com>,
Lai Jiangshan <jiangshanlai@...il.com>,
Joel Fernandes <joel@...lfernandes.org>, <rcu@...r.kernel.org>,
<linux-kernel@...r.kernel.org>
CC: Zhen Lei <thunder.leizhen@...wei.com>,
Robert Elliott <elliott@....com>
Subject: [PATCH v4 0/4] rcu: Add RCU stall diagnosis information
v3 --> v4:
1. Rename rcu_cpu_stall_deep_debug to rcu_cpu_stall_cputime.
v2 --> v3:
1. Fix the return type of kstat_cpu_irqs_sum()
2. Add Kconfig option CONFIG_RCU_CPU_STALL_DEEP_DEBUG and boot parameter
rcupdate.rcu_cpu_stall_deep_debug.
3. Add comments and normalize local variable name
v1 --> v2:
1. Fixed a bug in the code. If the rcu stall is detected by another CPU,
kcpustat_this_cpu cannot be used.
@@ -451,7 +451,7 @@ static void print_cpu_stat_info(int cpu)
if (r->gp_seq != rdp->gp_seq)
return;
- cpustat = kcpustat_this_cpu->cpustat;
+ cpustat = kcpustat_cpu(cpu).cpustat;
2. Move the start point of statistics from rcu_stall_kick_kthreads() to
rcu_implicit_dynticks_qs(), removing the dependency on irq_work.
v1:
In some extreme cases, such as the I/O pressure test, the CPU usage may
be 100%, causing RCU stall. In this case, the printed information about
current is not useful. Displays the number and usage of hard interrupts,
soft interrupts, and context switches that are generated within half of
the CPU stall timeout, can help us make a general judgment. In other
cases, we can preliminarily determine whether an infinite loop occurs
when local_irq, local_bh or preempt is disabled.
Zhen Lei (4):
genirq: Fix the return type of kstat_cpu_irqs_sum()
sched: Add helper kstat_cpu_softirqs_sum()
sched: Add helper nr_context_switches_cpu()
rcu: Add RCU stall diagnosis information
.../admin-guide/kernel-parameters.txt | 5 +++
include/linux/kernel_stat.h | 14 ++++++++-
kernel/rcu/Kconfig.debug | 10 ++++++
kernel/rcu/rcu.h | 1 +
kernel/rcu/tree.c | 16 ++++++++++
kernel/rcu/tree.h | 17 ++++++++++
kernel/rcu/tree_stall.h | 31 +++++++++++++++++++
kernel/rcu/update.c | 2 ++
kernel/sched/core.c | 5 +++
9 files changed, 100 insertions(+), 1 deletion(-)
--
2.25.1
Powered by blists - more mailing lists