From: "Elliott, Robert (Servers)" <elliott@hpe.com>
To: "Leizhen (ThunderTown)" <thunder.leizhen@huawei.com>,
"paulmck@kernel.org" <paulmck@kernel.org>
Cc: Frederic Weisbecker <frederic@kernel.org>,
Neeraj Upadhyay <quic_neeraju@quicinc.com>,
Josh Triplett <josh@joshtriplett.org>,
"Steven Rostedt" <rostedt@goodmis.org>,
Mathieu Desnoyers <mathieu.desnoyers@efficios.com>,
Lai Jiangshan <jiangshanlai@gmail.com>,
Joel Fernandes <joel@joelfernandes.org>,
"rcu@vger.kernel.org" <rcu@vger.kernel.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: RE: [PATCH v4 4/4] rcu: Add RCU stall diagnosis information
Date: Tue, 8 Nov 2022 19:29:34 +0000 [thread overview]
Message-ID: <MW5PR84MB18421BE7AC33B65B9414928DAB3F9@MW5PR84MB1842.NAMPRD84.PROD.OUTLOOK.COM> (raw)
In-Reply-To: <e6f96a66-59e6-5889-a0f0-6451d8469c24@huawei.com>
> Maybe we should add another member to record jiffies.
>
> diff --git a/kernel/rcu/tree.c b/kernel/rcu/tree.c
> index b33165dba1ea745..6d9c876ea5c85a6 100644
> --- a/kernel/rcu/tree.c
> +++ b/kernel/rcu/tree.c
> @@ -880,6 +880,7 @@ static int rcu_implicit_dynticks_qs(struct rcu_data
> *rdp)
> rsrp->nr_hardirqs = kstat_cpu_irqs_sum(rdp->cpu);
> rsrp->nr_softirqs = kstat_cpu_softirqs_sum(rdp-
> >cpu);
> rsrp->nr_csw = nr_context_switches_cpu(rdp->cpu);
> + rsrp->jiffies = jiffies;
> rsrp->gp_seq = rdp->gp_seq;
Yes, that works:
[ 252.139108] tcrypt: rcu testing - kernel_fpu_disable for rude 22 s
[ 255.140204] rcu: INFO: rcu_preempt self-detected stall on CPU 39
[ 255.146438] rcu: CPU 39-....: (2995 ticks this GP) idle=5014/1/0x4000000000000000 softirq=2373/2374 fqs=751
[ 255.156512] rcu: CPU 39 hardirqs softirqs csw system cond_resched
[ 255.165182] rcu: CPU 39 count: 0 3 0 0
[ 255.173853] rcu: CPU 39 cputime: 3 0 1493 ==> 1530 (ms)
[ 255.183746] rcu: CPU 39 current: in_kernel_fpu_begin=1 preemptible=0
[ 255.190407] rcu: CPU 39 self-detected stall t=3051 jiffies g=18181 q=373 ncpus=56
[ 255.198205] CPU: 39 PID: 2607 Comm: modprobe Not tainted 6.0.0+ #14
...
[ 264.450164] rcu: INFO: rcu_preempt self-detected stall on CPU 39
[ 264.456416] rcu: CPU 39-...k.: (12000 ticks this GP) idle=5014/1/0x4000000000000000 softirq=2373/2374 fqs=3006
[ 264.466690] rcu: CPU 39 hardirqs softirqs csw system cond_resched
[ 264.475390] rcu: CPU 39 count: 0 21 0 0
[ 264.484092] rcu: CPU 39 cputime: 328 0 8982 ==> 9293 (ms)
[ 264.494015] rcu: CPU 39 current: in_kernel_fpu_begin=1 preemptible=0
[ 264.500706] rcu: CPU 39 self-detected stall t=12361 jiffies g=18181 q=601 ncpus=56
[ 264.508619] CPU: 39 PID: 2607 Comm: modprobe Not tainted 6.0.0+ #14
...
[ 273.760124] rcu: INFO: rcu_preempt self-detected stall on CPU 39
[ 273.766376] rcu: CPU 39-....: (21004 ticks this GP) idle=5014/1/0x4000000000000000 softirq=2373/2374 fqs=5262
[ 273.776649] rcu: CPU 39 hardirqs softirqs csw system cond_resched
[ 273.785348] rcu: CPU 39 count: 0 17 0 0
[ 273.794050] rcu: CPU 39 cputime: 328 0 8981 ==> 9293 (ms)
[ 273.803971] rcu: CPU 39 current: in_kernel_fpu_begin=1 preemptible=0
[ 273.810660] rcu: CPU 39 self-detected stall t=21671 jiffies g=18181 q=1112 ncpus=56
[ 273.818659] CPU: 39 PID: 2607 Comm: modprobe Not tainted 6.0.0+ #14
next prev parent reply other threads:[~2022-11-08 19:30 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-11-04 2:12 [PATCH v4 0/4] " Zhen Lei
2022-11-04 2:12 ` [PATCH v4 1/4] genirq: Fix the return type of kstat_cpu_irqs_sum() Zhen Lei
2022-11-04 2:12 ` [PATCH v4 2/4] sched: Add helper kstat_cpu_softirqs_sum() Zhen Lei
2022-11-04 2:12 ` [PATCH v4 3/4] sched: Add helper nr_context_switches_cpu() Zhen Lei
2022-11-04 2:12 ` [PATCH v4 4/4] rcu: Add RCU stall diagnosis information Zhen Lei
2022-11-04 3:12 ` Leizhen (ThunderTown)
2022-11-04 13:43 ` Paul E. McKenney
2022-11-05 1:58 ` Elliott, Robert (Servers)
2022-11-05 7:03 ` Leizhen (ThunderTown)
2022-11-05 20:32 ` Paul E. McKenney
2022-11-07 3:20 ` Leizhen (ThunderTown)
2022-11-05 20:06 ` Paul E. McKenney
2022-11-07 2:10 ` Elliott, Robert (Servers)
2022-11-07 11:49 ` Leizhen (ThunderTown)
2022-11-07 20:38 ` Elliott, Robert (Servers)
2022-11-07 21:57 ` Elliott, Robert (Servers)
2022-11-08 3:06 ` Leizhen (ThunderTown)
2022-11-08 5:53 ` Elliott, Robert (Servers)
2022-11-08 6:41 ` Leizhen (ThunderTown)
2022-11-08 19:29 ` Elliott, Robert (Servers) [this message]
2022-11-08 3:18 ` Leizhen (ThunderTown)
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=MW5PR84MB18421BE7AC33B65B9414928DAB3F9@MW5PR84MB1842.NAMPRD84.PROD.OUTLOOK.COM \
--to=elliott@hpe.com \
--cc=frederic@kernel.org \
--cc=jiangshanlai@gmail.com \
--cc=joel@joelfernandes.org \
--cc=josh@joshtriplett.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mathieu.desnoyers@efficios.com \
--cc=paulmck@kernel.org \
--cc=quic_neeraju@quicinc.com \
--cc=rcu@vger.kernel.org \
--cc=rostedt@goodmis.org \
--cc=thunder.leizhen@huawei.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®