Thread (36 messages) flat view 36 messages, 7 authors, 2026-08-11

Re: [PATCH v4 1/5] mm: Make per-VMA locks available universally

From: Dave Hansen <hidden>
Date: 2026-08-10 15:22:49
Also in: linux-mm, lkml

On 8/10/26 03:17, Lorenzo Stoakes (ARM) wrote:
On Thu, Aug 06, 2026 at 01:05:44PM -0700, Suren Baghdasaryan wrote:
...
quoted
The downside of this is adding some fields to vm_area_struct and
mm_struct. There are likely ways to optimize this, especially for
things like SMP=n configs. For now, do the simplest thing: use the
same implementation everywhere.
I think for most cases SMP=n arches are not going to be scaling too crazily
on threads/processes anyway.

If real world usecases exist that the struct bloat causes problems for then
optimisations for those can be looked into.
Yup, totally agree. It's not worth adding complexity and bugs when the
gains would be small.
But I wonder if cache line alignment would in any case alter the impact of
this anyway?
Yes, the CONFIG_PER_VMA_LOCK structures are spread across a couple of
spots in vm_area_struct. At least one of them is 4 bytes and another is
____cacheline_aligned_in_smp. I'd eat my hat if there aren't at least a
couple of bytes that could be trimmed.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help