]> Git Repo - J-linux.git/commitdiff
ftrace: Choose RCU Tasks based on TASKS_RCU rather than PREEMPTION
authorPaul E. McKenney <[email protected]>
Wed, 28 Feb 2024 19:30:43 +0000 (11:30 -0800)
committerUladzislau Rezki (Sony) <[email protected]>
Fri, 12 Apr 2024 09:23:42 +0000 (11:23 +0200)
The advent of CONFIG_PREEMPT_AUTO, AKA lazy preemption, will mean that
even kernels built with CONFIG_PREEMPT_NONE or CONFIG_PREEMPT_VOLUNTARY
might see the occasional preemption, and that this preemption just might
happen within a trampoline.

Therefore, update ftrace_shutdown() to invoke synchronize_rcu_tasks()
based on CONFIG_TASKS_RCU instead of CONFIG_PREEMPTION.

[ paulmck: Apply Steven Rostedt feedback. ]

Signed-off-by: Paul E. McKenney <[email protected]>
Cc: Steven Rostedt <[email protected]>
Cc: Masami Hiramatsu <[email protected]>
Cc: Mark Rutland <[email protected]>
Cc: Mathieu Desnoyers <[email protected]>
Cc: Ankur Arora <[email protected]>
Cc: Thomas Gleixner <[email protected]>
Cc: <[email protected]>
Signed-off-by: Uladzislau Rezki (Sony) <[email protected]>
kernel/trace/ftrace.c

index da1710499698b0ed56ea89183d18befda56c0243..6c96b30f3d63b0a681de16deb50a6a96f6d0c61d 100644 (file)
@@ -3157,8 +3157,7 @@ out:
                 * synchronize_rcu_tasks() will wait for those tasks to
                 * execute and either schedule voluntarily or enter user space.
                 */
-               if (IS_ENABLED(CONFIG_PREEMPTION))
-                       synchronize_rcu_tasks();
+               synchronize_rcu_tasks();
 
                ftrace_trampoline_free(ops);
        }
This page took 0.054519 seconds and 4 git commands to generate.