[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20220425082309.3328723-1-qiang1.zhang@intel.com>
Date: Mon, 25 Apr 2022 16:23:09 +0800
From: Zqiang <qiang1.zhang@...el.com>
To: paulmck@...nel.org, frederic@...nel.org
Cc: rcu@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: [PATCH] rcu: Add nocb_cb_kthread check to rcu_is_callbacks_kthread()
At present, there are two situations which the rcu callback function
be exectued in the kthreads, one is if the use_softirq is set to zero,
the RCU_SOFTIRQ processing is carried out by the per-CPU rcuc kthreads,
for non-offload rdp, the rdp's rcu callback function be exectued in rcuc
kthreads. another one is if the rdp is set to offloaded, the rdp's rcu
callback function be exected in the rcuop kthreads.
Signed-off-by: Zqiang <qiang1.zhang@...el.com>
---
kernel/rcu/tree_plugin.h | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/kernel/rcu/tree_plugin.h b/kernel/rcu/tree_plugin.h
index 971bb6a00ede..845dbfc876a2 100644
--- a/kernel/rcu/tree_plugin.h
+++ b/kernel/rcu/tree_plugin.h
@@ -1157,7 +1157,8 @@ static void rcu_initiate_boost(struct rcu_node *rnp, unsigned long flags)
*/
static bool rcu_is_callbacks_kthread(void)
{
- return __this_cpu_read(rcu_data.rcu_cpu_kthread_task) == current;
+ return __this_cpu_read(rcu_data.rcu_cpu_kthread_task) == current ||
+ __this_cpu_read(rcu_data.nocb_cb_kthread) == current;
}
#define RCU_BOOST_DELAY_JIFFIES DIV_ROUND_UP(CONFIG_RCU_BOOST_DELAY * HZ, 1000)
--
2.25.1
Powered by blists - more mailing lists