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: <CAMzpN2gc-OGabKXyEAQSeRRdahWfEosoFapRx6bERxJQxCD+SQ@mail.gmail.com>
Date: Wed, 26 Feb 2025 21:09:49 -0500
From: Brian Gerst <brgerst@...il.com>
To: Uros Bizjak <ubizjak@...il.com>
Cc: linux-kernel@...r.kernel.org, x86@...nel.org, 
	Ingo Molnar <mingo@...nel.org>, "H . Peter Anvin" <hpa@...or.com>, Thomas Gleixner <tglx@...utronix.de>, 
	Borislav Petkov <bp@...en8.de>, Ard Biesheuvel <ardb@...nel.org>, 
	Linus Torvalds <torvalds@...uxfoundation.org>, Andy Lutomirski <luto@...nel.org>, 
	Peter Zijlstra <peterz@...radead.org>, Andrew Morton <akpm@...ux-foundation.org>
Subject: Re: [PATCH v2 01/11] percpu: Introduce percpu hot section

On Wed, Feb 26, 2025 at 2:36 PM Uros Bizjak <ubizjak@...il.com> wrote:
>
> On Wed, Feb 26, 2025 at 7:05 PM Brian Gerst <brgerst@...il.com> wrote:
> >
> > Add a subsection to the percpu data for frequently accessed variables
> > that should remain cached on each processor.  These varables should not
> > be accessed from other processors to avoid cacheline bouncing.
> >
> > This will replace the pcpu_hot struct on x86, and open up similar
> > functionality to other architectures and the kernel core.
> >
> > Signed-off-by: Brian Gerst <brgerst@...il.com>
> > ---
> >  include/asm-generic/vmlinux.lds.h | 10 ++++++++++
> >  include/linux/percpu-defs.h       | 12 ++++++++++++
> >  2 files changed, 22 insertions(+)
> >
> > diff --git a/include/asm-generic/vmlinux.lds.h b/include/asm-generic/vmlinux.lds.h
> > index 92fc06f7da74..92dd6065fd0a 100644
> > --- a/include/asm-generic/vmlinux.lds.h
> > +++ b/include/asm-generic/vmlinux.lds.h
> > @@ -385,6 +385,11 @@ defined(CONFIG_AUTOFDO_CLANG) || defined(CONFIG_PROPELLER_CLANG)
> >         . = ALIGN(PAGE_SIZE);                                           \
> >         __nosave_end = .;
> >
> > +#define CACHE_HOT_DATA(align)                                          \
> > +       . = ALIGN(align);                                               \
> > +       *(SORT_BY_ALIGNMENT(.data..hot.*))                              \
> > +       . = ALIGN(align);
> > +
> >  #define PAGE_ALIGNED_DATA(page_align)                                  \
> >         . = ALIGN(page_align);                                          \
> >         *(.data..page_aligned)                                          \
> > @@ -1065,6 +1070,10 @@ defined(CONFIG_AUTOFDO_CLANG) || defined(CONFIG_PROPELLER_CLANG)
> >         . = ALIGN(PAGE_SIZE);                                           \
> >         *(.data..percpu..page_aligned)                                  \
> >         . = ALIGN(cacheline);                                           \
> > +       __per_cpu_hot_start = .;                                        \
> > +       *(SORT_BY_ALIGNMENT(.data..percpu..hot.*))                      \
> > +       . = ALIGN(cacheline);                                           \
> > +       __per_cpu_hot_end = .;                                          \
> >         *(.data..percpu..read_mostly)                                   \
> >         . = ALIGN(cacheline);                                           \
> >         *(.data..percpu)                                                \
> > @@ -1112,6 +1121,7 @@ defined(CONFIG_AUTOFDO_CLANG) || defined(CONFIG_PROPELLER_CLANG)
> >                 INIT_TASK_DATA(inittask)                                \
> >                 NOSAVE_DATA                                             \
> >                 PAGE_ALIGNED_DATA(pagealigned)                          \
> > +               CACLE_HOT_DATA(cacheline)                               \
>
> There is a typo in the above macro name.

Fixed in the next version.


Brian Gerst

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ