All of lore.kernel.org
 help / color / mirror / Atom feed
From: Frederic Weisbecker <frederic@kernel.org>
To: Zhen Lei <thunder.leizhen@huawei.com>
Cc: "Paul E . McKenney" <paulmck@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, linux-kernel@vger.kernel.org,
	Robert Elliott <elliott@hpe.com>
Subject: Re: [PATCH v8 0/6] rcu: Add RCU stall diagnosis information
Date: Tue, 22 Nov 2022 12:59:28 +0100	[thread overview]
Message-ID: <20221122115928.GA1158713@lothringen> (raw)
In-Reply-To: <20221119092508.1766-1-thunder.leizhen@huawei.com>

On Sat, Nov 19, 2022 at 05:25:02PM +0800, Zhen Lei wrote:
> v7 --> v8:
> 1. Change call jiffies64_to_msecs() to call jiffies_to_msecs().
> 2. Mention that rcupdate.rcu_cpu_stall_cputime overrides
>    CONFIG_RCU_CPU_STALL_CPUTIME behaviour in the Kconfig help text.
> 3. Fix a make htmldocs warning, change "|...|" to ":...:".
> 
> v6 --> v7:
> 1. Use kcpustat_field() to obtain the cputime.
> 2. Make the output start with "\t" to match other related prints.
> 3. Aligns the output of the last line of RCU stall.
> 
> v5 --> v6:
> 1. When there are more than two continuous RCU stallings, correctly handle the
>    value of the second and subsequent sampling periods. Update comments and
>    document.
>    Thanks to Elliott, Robert for the test.
> 2. Change "rcu stall" to "RCU stall".
> 
> v4 --> v5:
> 1. Resolve a git am conflict. No code change.
> 
> 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 (6):
>   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
>   doc: Document CONFIG_RCU_CPU_STALL_CPUTIME=y stall information
>   rcu: Align the output of RCU stall

Reviewed-by: Frederic Weisbecker <frederic@kernel.org>

Thanks!

> 
>  Documentation/RCU/stallwarn.rst               | 88 +++++++++++++++++++
>  .../admin-guide/kernel-parameters.txt         |  6 ++
>  include/linux/kernel_stat.h                   | 14 ++-
>  kernel/rcu/Kconfig.debug                      | 13 +++
>  kernel/rcu/rcu.h                              |  1 +
>  kernel/rcu/tree.c                             | 18 ++++
>  kernel/rcu/tree.h                             | 19 ++++
>  kernel/rcu/tree_stall.h                       | 35 +++++++-
>  kernel/rcu/update.c                           |  2 +
>  kernel/sched/core.c                           |  5 ++
>  10 files changed, 198 insertions(+), 3 deletions(-)
> 
> -- 
> 2.25.1
> 

  parent reply	other threads:[~2022-11-22 11:59 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-11-19  9:25 [PATCH v8 0/6] rcu: Add RCU stall diagnosis information Zhen Lei
2022-11-19  9:25 ` [PATCH v8 1/6] genirq: Fix the return type of kstat_cpu_irqs_sum() Zhen Lei
2022-11-19  9:25 ` [PATCH v8 2/6] sched: Add helper kstat_cpu_softirqs_sum() Zhen Lei
2022-11-19  9:25 ` [PATCH v8 3/6] sched: Add helper nr_context_switches_cpu() Zhen Lei
2022-11-19  9:25 ` [PATCH v8 4/6] rcu: Add RCU stall diagnosis information Zhen Lei
2022-11-19  9:25 ` [PATCH v8 5/6] doc: Document CONFIG_RCU_CPU_STALL_CPUTIME=y stall information Zhen Lei
2022-11-19  9:25 ` [PATCH v8 6/6] rcu: Align the output of RCU stall Zhen Lei
2022-11-21 22:29 ` [PATCH v8 0/6] rcu: Add RCU stall diagnosis information Paul E. McKenney
2022-11-22  2:14   ` Leizhen (ThunderTown)
2022-11-23  0:26     ` Paul E. McKenney
2022-11-22 11:59 ` Frederic Weisbecker [this message]
2022-11-23  0:27   ` Paul E. McKenney

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=20221122115928.GA1158713@lothringen \
    --to=frederic@kernel.org \
    --cc=elliott@hpe.com \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.