Re: [PATCH tip/core/rcu 16/26] rcu: Mark rcu_nmi_enter() call to rcu_cleanup_after_idle() noinstr

Peter Zijlstra
2020-06-23T17:05:16Z

On Mon, Jun 22, 2020 at 05:21:37PM -0700, paulmck@kernel.org wrote:
> From: "Paul E. McKenney" <paulmck@kernel.org>
>
> The objtool complains about the call to rcu_cleanup_after_idle() from
> rcu_nmi_enter(), so this commit adds instrumentation_begin() before that
> call and instrumentation_end() after it.

Hmm, I've not seen this one. Still,

Acked-by: Peter Zijlstra (Intel) <peterz@infradead.org>

> Signed-off-by: Paul E. McKenney <paulmck@kernel.org>
> ---
> kernel/rcu/tree.c | 5 ++++-
> 1 file changed, 4 insertions(+), 1 deletion(-)
>
> diff --git a/kernel/rcu/tree.c b/kernel/rcu/tree.c
> index 08e3648..67912ad 100644
> --- a/kernel/rcu/tree.c
> +++ b/kernel/rcu/tree.c
> @@ -980,8 +980,11 @@ noinstr void rcu_nmi_enter(void)
> rcu_dynticks_eqs_exit();
> // ... but is watching here.
>
> - if (!in_nmi())
> + if (!in_nmi()) {
> + instrumentation_begin();
> rcu_cleanup_after_idle();
> + instrumentation_end();
> + }
>
> incby = 1;
> } else if (!in_nmi()) {
> --
> 2.9.5
>