On Wed, Apr 24, 2024 at 2:09 AM Joel Fernandes <[email protected]> wrote: > > On Sun, Apr 7, 2024 at 5:06 AM Lai Jiangshan <[email protected]> wrote: > > > > From: Lai Jiangshan <[email protected]> > > > > Implement PCPU_RCU_PREEMPT_COUNT for x86. > > Mainly copied from asm/preempt.h > > > > Make rcu_read_[un]lock() inlined for rcu-preempt. > > Changelog is wrong. You inlined rcu_read_[un]lock in previous patch, > not this one?
The previous patch just adds the non-arch framework code. The incline only happens when CONFIG_PCPU_RCU_PREEMPT_COUNT=y. This patch implements PCPU_RCU_PREEMPT_COUNT for x86, so rcu_read_[un]lock() was not made inlined for x86 for rcu-preempt until this patch. Thanks Lai > > - Joel > > > Make rcu_read_lock() only one instruction. > > Make rcu_read_unlock() only two instructions in the fast path. > > > > Cc: "Paul E. McKenney" <[email protected]> > > Cc: Peter Zijlstra <[email protected]> > > Cc: Frederic Weisbecker <[email protected]> > > Signed-off-by: Lai Jiangshan <[email protected]> > > --- > > arch/x86/Kconfig | 1 + > > arch/x86/include/asm/current.h | 3 + > > arch/x86/include/asm/rcu_preempt.h | 107 +++++++++++++++++++++++++++++ > > arch/x86/kernel/cpu/common.c | 4 ++ > > 4 files changed, 115 insertions(+) > > create mode 100644 arch/x86/include/asm/rcu_preempt.h > > > > diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig > > index 4fff6ed46e90..e805cac3763d 100644 > > --- a/arch/x86/Kconfig > > +++ b/arch/x86/Kconfig > > @@ -256,6 +256,7 @@ config X86 > > select HAVE_OBJTOOL if X86_64 > > select HAVE_OPTPROBES > > select HAVE_PAGE_SIZE_4KB > > + select HAVE_PCPU_RCU_PREEMPT_COUNT > > select HAVE_PCSPKR_PLATFORM > > select HAVE_PERF_EVENTS > > select HAVE_PERF_EVENTS_NMI
