[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAGudoHHZfd1C1cLU_N+VNO2pSMZhHcFOoBNPR-RYN+NgRGoHEQ@mail.gmail.com>
Date: Fri, 12 Dec 2025 14:13:06 +0100
From: Mateusz Guzik <mjguzik@...il.com>
To: David Laight <david.laight.linux@...il.com>
Cc: Vlastimil Babka <vbabka@...e.cz>, Lorenzo Stoakes <lorenzo.stoakes@...cle.com>,
Andrew Morton <akpm@...ux-foundation.org>, David Hildenbrand <david@...nel.org>,
"Liam R . Howlett" <Liam.Howlett@...cle.com>, Mike Rapoport <rppt@...nel.org>,
Suren Baghdasaryan <surenb@...gle.com>, Michal Hocko <mhocko@...e.com>, oliver.sang@...el.com,
linux-mm@...ck.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] mm: avoid use of BIT() macro for initialising VMA flags
On Fri, Dec 12, 2025 at 2:02 PM David Laight
<david.laight.linux@...il.com> wrote:
>
> On Fri, 12 Dec 2025 13:24:57 +0100
> Mateusz Guzik <mjguzik@...il.com> wrote:
>
> > So I had a look where the timing difference is coming from and I think
> > I have the answer: init_ipc_ns does not have a guaranteed cacheline
> > placement and things get moved around with the patch.
> >
> > On my kernels (nm vmlinux-newbits | sort -nk 1 | less)
> >
> > before:
> > ffffffff839ffb60 T init_ipc_ns
> > ffffffff83a00020 t event_exit__msgrcv
> >
> > after:
> > ffffffff839ffbc0 T init_ipc_ns
> > ffffffff83a00080 t event_exit__msgrcv
> >
> > This is the pervasive problem of vars from all .o files placed
> > adjacent to each other, meaning changes in one .o file result in
> > offsets changing in other files and then you get performance
> > fluctuations as not-explicitly-padded variables share (or no longer
> > share) cachelines.
>
> Those look like text symbols, not data ones.
I don't know why it is annotated with T.
There is only one symbol in the kernel with that name and it is the var.
You can see the same thing for other vars, for example:
ffffffff83808040 T mmlist_lock
ffffffff83808080 T tasklist_lock
Powered by blists - more mailing lists