Re: [PATCH v4 1/5] mm: Make per-VMA locks available universally
Dave Hansen <[email protected]>
| Newsgroups | org.kernel.vger.netdev,org.kernel.vger.linux-kernel,org.kvack.linux-mm |
|---|---|
| Message-ID | <[email protected]> |
On 8/10/26 03:17, Lorenzo Stoakes (ARM) wrote: > On Thu, Aug 06, 2026 at 01:05:44PM -0700, Suren Baghdasaryan wrote: ... >> 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.