]> git.proxmox.com Git - mirror_ubuntu-jammy-kernel.git/commitdiff
rcu: Fix tracepoint tracking RCU CPU kthread utilization
authorLai Jiangshan <jiangshanlai@gmail.com>
Tue, 15 Oct 2019 10:23:57 +0000 (10:23 +0000)
committerPaul E. McKenney <paulmck@kernel.org>
Fri, 24 Jan 2020 18:33:31 +0000 (10:33 -0800)
In the call to trace_rcu_utilization() at the start of the loop in
rcu_cpu_kthread(), "rcu_wait" is incorrect, plus this trace event needs
to be hoisted above the loop to balance with either the "rcu_wait" or
"rcu_yield", depending on how the loop exits.  This commit therefore
makes these changes.

Signed-off-by: Lai Jiangshan <jiangshanlai@gmail.com>
Signed-off-by: Lai Jiangshan <laijs@linux.alibaba.com>
Signed-off-by: Paul E. McKenney <paulmck@kernel.org>
kernel/rcu/tree.c

index dd8cfc34f4dacc056c4cb6bb42d820a1fa4d120c..ba154a3080fb5280c272fab6e578451c59e0e4e7 100644 (file)
@@ -2474,8 +2474,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_wait"));
                local_bh_disable();
                *statusp = RCU_KTHREAD_RUNNING;
                local_irq_disable();