All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] rcu: Add nocb_cb_kthread check to rcu_is_callbacks_kthread()
@ 2022-04-25  8:23 Zqiang
  2022-04-25 10:47 ` kernel test robot
  2022-04-25 16:54 ` kernel test robot
  0 siblings, 2 replies; 3+ messages in thread
From: Zqiang @ 2022-04-25  8:23 UTC (permalink / raw)
  To: paulmck, frederic; +Cc: rcu, linux-kernel

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@intel.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


^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2022-04-25 16:54 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-04-25  8:23 [PATCH] rcu: Add nocb_cb_kthread check to rcu_is_callbacks_kthread() Zqiang
2022-04-25 10:47 ` kernel test robot
2022-04-25 16:54 ` kernel test robot

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.