]> git.baikalelectronics.ru Git - kernel.git/commit
x86/entry: Provide idtentry_entry/exit_cond_rcu()
authorThomas Gleixner <tglx@linutronix.de>
Thu, 21 May 2020 20:05:17 +0000 (22:05 +0200)
committerThomas Gleixner <tglx@linutronix.de>
Thu, 11 Jun 2020 13:15:04 +0000 (15:15 +0200)
commit42088813a772d4f7145b4764c484b79b353cb1e8
tree8a5a5c65cf05151e9747dea2ce0d69c0da21b121
parent05b4846bdf2994b09f4d7033c0026aa358bd5c2f
x86/entry: Provide idtentry_entry/exit_cond_rcu()

After a lengthy discussion [1] it turned out that RCU does not need a full
rcu_irq_enter/exit() when RCU is already watching. All it needs if
NOHZ_FULL is active is to check whether the tick needs to be restarted.

This allows to avoid a separate variant for the pagefault handler which
cannot invoke rcu_irq_enter() on a kernel pagefault which might sleep.

The cond_rcu argument is only temporary and will be removed once the
existing users of idtentry_enter/exit() have been cleaned up. After that
the code can be significantly simplified.

[ mingo: Simplified the control flow ]

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Acked-by: "Paul E. McKenney" <paulmck@kernel.org>
Acked-by: Andy Lutomirski <luto@kernel.org>
Link: [1] https://lkml.kernel.org/r/20200515235125.628629605@linutronix.de
Link: https://lore.kernel.org/r/20200521202117.181397835@linutronix.de
arch/x86/entry/common.c
arch/x86/include/asm/idtentry.h