lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAJhGHyDyvUcXruA+kum_QPn-2pB1j+WjS-HyGCFJ8dYpW_vQFw@mail.gmail.com>
Date: Wed, 24 Apr 2024 10:53:30 +0800
From: Lai Jiangshan <jiangshanlai@...il.com>
To: Joel Fernandes <joel@...lfernandes.org>
Cc: linux-kernel@...r.kernel.org, rcu@...r.kernel.org, x86@...nel.org, 
	Lai Jiangshan <jiangshan.ljs@...group.com>, "Paul E. McKenney" <paulmck@...nel.org>, 
	Peter Zijlstra <peterz@...radead.org>, Frederic Weisbecker <frederic@...nel.org>, 
	Thomas Gleixner <tglx@...utronix.de>, Ingo Molnar <mingo@...hat.com>, Borislav Petkov <bp@...en8.de>, 
	Dave Hansen <dave.hansen@...ux.intel.com>, "H. Peter Anvin" <hpa@...or.com>, 
	Uros Bizjak <ubizjak@...il.com>, Josh Poimboeuf <jpoimboe@...nel.org>, 
	Breno Leitao <leitao@...ian.org>, Kent Overstreet <kent.overstreet@...ux.dev>, 
	Pawan Gupta <pawan.kumar.gupta@...ux.intel.com>, 
	Rick Edgecombe <rick.p.edgecombe@...el.com>, Vegard Nossum <vegard.nossum@...cle.com>, 
	Daniel Sneddon <daniel.sneddon@...ux.intel.com>, Nikolay Borisov <nik.borisov@...e.com>
Subject: Re: [PATCH V2 10/11] x86/rcu: Add rcu_preempt_count

On Wed, Apr 24, 2024 at 2:09 AM Joel Fernandes <joel@...lfernandes.org> wrote:
>
> On Sun, Apr 7, 2024 at 5:06 AM Lai Jiangshan <jiangshanlai@...il.com> wrote:
> >
> > From: Lai Jiangshan <jiangshan.ljs@...group.com>
> >
> > 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" <paulmck@...nel.org>
> > Cc: Peter Zijlstra <peterz@...radead.org>
> > Cc: Frederic Weisbecker <frederic@...nel.org>
> > Signed-off-by: Lai Jiangshan <jiangshan.ljs@...group.com>
> > ---
> >  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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ