Skip to content

Commit 481aa5f

Browse files
paulmckrcuFrederic Weisbecker
authored andcommitted
rcu: Allow short-circuiting of synchronize_rcu_tasks_rude()
There are now architectures for which all deep-idle and entry-exit functions are properly inlined or marked noinstr. Such architectures do not need synchronize_rcu_tasks_rude(), or will not once RCU Tasks has been modified to pay attention to idle tasks. This commit therefore allows a CONFIG_ARCH_HAS_NOINSTR_MARKINGS Kconfig option to turn synchronize_rcu_tasks_rude() into a no-op. To facilitate testing, kernels built by rcutorture scripting will enable RCU Tasks Trace even on systems that do not need it. [ paulmck: Apply Peter Zijlstra feedback. ] Signed-off-by: Paul E. McKenney <[email protected]> Cc: Peter Zijlstra <[email protected]> Signed-off-by: Neeraj Upadhyay <[email protected]> Signed-off-by: Frederic Weisbecker <[email protected]>
1 parent 4fa7f72 commit 481aa5f

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

kernel/rcu/tasks.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1398,7 +1398,8 @@ static void call_rcu_tasks_rude(struct rcu_head *rhp, rcu_callback_t func)
13981398
*/
13991399
void synchronize_rcu_tasks_rude(void)
14001400
{
1401-
synchronize_rcu_tasks_generic(&rcu_tasks_rude);
1401+
if (!IS_ENABLED(CONFIG_ARCH_WANTS_NO_INSTR) || IS_ENABLED(CONFIG_FORCE_TASKS_RUDE_RCU))
1402+
synchronize_rcu_tasks_generic(&rcu_tasks_rude);
14021403
}
14031404
EXPORT_SYMBOL_GPL(synchronize_rcu_tasks_rude);
14041405

0 commit comments

Comments
 (0)