rcu.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] rcu: Make call_rcu() lazy only when CONFIG_RCU_LAZY is enabled
@ 2022-10-19 10:40 Zqiang
  2022-10-19 12:10 ` Joel Fernandes
  0 siblings, 1 reply; 12+ messages in thread
From: Zqiang @ 2022-10-19 10:40 UTC (permalink / raw)
  To: paulmck, frederic, joel; +Cc: rcu, linux-kernel

Currently, regardless of whether the CONFIG_RCU_LAZY is enabled,
invoke the call_rcu() is always lazy, it also means that when
CONFIG_RCU_LAZY is disabled, invoke the call_rcu_flush() is also
lazy. therefore, this commit make call_rcu() lazy only when
CONFIG_RCU_LAZY is enabled.

Signed-off-by: Zqiang <qiang1.zhang@intel.com>
---
 kernel/rcu/tree.c | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/kernel/rcu/tree.c b/kernel/rcu/tree.c
index abc615808b6e..97ef602da3d5 100644
--- a/kernel/rcu/tree.c
+++ b/kernel/rcu/tree.c
@@ -2839,7 +2839,6 @@ void call_rcu_flush(struct rcu_head *head, rcu_callback_t func)
 	return __call_rcu_common(head, func, false);
 }
 EXPORT_SYMBOL_GPL(call_rcu_flush);
-#endif
 
 /**
  * call_rcu() - Queue an RCU callback for invocation after a grace period.
@@ -2890,6 +2889,13 @@ void call_rcu(struct rcu_head *head, rcu_callback_t func)
 	return __call_rcu_common(head, func, true);
 }
 EXPORT_SYMBOL_GPL(call_rcu);
+#else
+void call_rcu(struct rcu_head *head, rcu_callback_t func)
+{
+	return __call_rcu_common(head, func, false);
+}
+EXPORT_SYMBOL_GPL(call_rcu);
+#endif
 
 /* Maximum number of jiffies to wait before draining a batch. */
 #define KFREE_DRAIN_JIFFIES (5 * HZ)
-- 
2.25.1


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

end of thread, other threads:[~2022-10-20 22:17 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-10-19 10:40 [PATCH] rcu: Make call_rcu() lazy only when CONFIG_RCU_LAZY is enabled Zqiang
2022-10-19 12:10 ` Joel Fernandes
2022-10-19 12:12   ` Joel Fernandes
2022-10-19 17:44     ` Paul E. McKenney
2022-10-19 18:25       ` Joel Fernandes
2022-10-19 23:21         ` Zhang, Qiang1
2022-10-19 23:34         ` Paul E. McKenney
2022-10-20  8:42           ` Joel Fernandes
2022-10-20 18:39             ` Paul E. McKenney
2022-10-20 18:46               ` Joel Fernandes
2022-10-20 21:33                 ` Joel Fernandes
2022-10-20 22:17                   ` Paul E. McKenney

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).