Re: [PATCH 3/7] rcu: trace_rcu_utilization() paired

From: Paul E. McKenney
Date: Tue Oct 15 2019 - 23:40:52 EST


On Tue, Oct 15, 2019 at 10:28:45AM +0000, Lai Jiangshan wrote:
> The notations include "Start" and "End", it is better
> when there are paired.
>
> Signed-off-by: Lai Jiangshan <jiangshanlai@xxxxxxxxx>
> Signed-off-by: Lai Jiangshan <laijs@xxxxxxxxxxxxxxxxx>
> ---
> kernel/rcu/tree.c | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/kernel/rcu/tree.c b/kernel/rcu/tree.c
> index c351fc280945..7830d5a06e69 100644
> --- a/kernel/rcu/tree.c
> +++ b/kernel/rcu/tree.c
> @@ -2484,8 +2484,8 @@ static void rcu_cpu_kthread(unsigned int cpu)
> char work, *workp = this_cpu_ptr(&rcu_data.rcu_cpu_has_work);
> int spincnt;
>
> + trace_rcu_utilization(TPS("Start CPU kthread@rcu_run"));
> for (spincnt = 0; spincnt < 10; spincnt++) {
> - trace_rcu_utilization(TPS("Start CPU kthread@rcu_run"));
> local_bh_disable();
> *statusp = RCU_KTHREAD_RUNNING;
> local_irq_disable();

This one is good -- great catch, by the way!

> @@ -2501,6 +2501,7 @@ static void rcu_cpu_kthread(unsigned int cpu)
> return;
> }
> }
> + trace_rcu_utilization(TPS("End CPU kthread@rcu_run"));
> *statusp = RCU_KTHREAD_YIELDING;
> trace_rcu_utilization(TPS("Start CPU kthread@rcu_yield"));

But here the addition of "rcu_run" is redundant with the pre-existing
rcu_yield.

So I folded the first hunk into the previous patch and dropped this
one.

As always, please let me know if I am missing something.

Thanx, Paul

> schedule_timeout_interruptible(2);
> --
> 2.20.1
>