Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

rcu: Make call_rcu() lazy only when CONFIG_RCU_LAZY is enabled #21

Open
wants to merge 2 commits into
base: rcu-dev
Choose a base branch
from
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
rcu: Make call_rcu() lazy only when CONFIG_RCU_LAZY is enabled
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>
Acked-by: Joel Fernandes (Google) <joel@joelfernandes.org>
qiangzh3 authored and chantra committed Oct 20, 2022
commit 458e9c3371346cd3aee8c8ab72587aa00fb098e8
2 changes: 1 addition & 1 deletion kernel/rcu/tree.c
Original file line number Diff line number Diff line change
@@ -2887,7 +2887,7 @@ EXPORT_SYMBOL_GPL(call_rcu_flush);
*/
void call_rcu(struct rcu_head *head, rcu_callback_t func)
{
return __call_rcu_common(head, func, true);
return __call_rcu_common(head, func, IS_ENABLED(CONFIG_RCU_LAZY));
}
EXPORT_SYMBOL_GPL(call_rcu);