From: Paul E. McKenney Date: Mon, 16 Mar 2020 22:22:44 +0000 (-0700) Subject: rcu-tasks: Use context-switch hook for PREEMPT=y kernels X-Git-Tag: block-5.8-2020-06-11~54^2~17^2^3~35 X-Git-Url: https://git.kernel.dk/?a=commitdiff_plain;h=66777e5821f6e672003fde697b8489402bb5aa98;p=linux-2.6-block.git rcu-tasks: Use context-switch hook for PREEMPT=y kernels Currently, the PREEMPT=y version of rcu_note_context_switch() does not invoke rcu_tasks_qs(), and we need it to in order to keep RCU Tasks Trace's IPIs down to a dull roar. This commit therefore enables this hook. Signed-off-by: Paul E. McKenney --- diff --git a/kernel/rcu/tree_plugin.h b/kernel/rcu/tree_plugin.h index 088e84e4578f..4f34c325dd90 100644 --- a/kernel/rcu/tree_plugin.h +++ b/kernel/rcu/tree_plugin.h @@ -331,6 +331,8 @@ void rcu_note_context_switch(bool preempt) rcu_qs(); if (rdp->exp_deferred_qs) rcu_report_exp_rdp(rdp); + if (!preempt) + rcu_tasks_qs(current); trace_rcu_utilization(TPS("End context switch")); } EXPORT_SYMBOL_GPL(rcu_note_context_switch);