Re: [PATCH v2 0/3] use vma locks for proc/pid/{smaps|numa_maps} reads
From: Suren Baghdasaryan
Date: Tue May 12 2026 - 23:53:53 EST
On Sun, Apr 26, 2026 at 12:59 PM Andrew Morton
<akpm@xxxxxxxxxxxxxxxxxxxx> wrote:
>
> On Sat, 25 Apr 2026 23:27:15 -0700 Suren Baghdasaryan <surenb@xxxxxxxxxx> wrote:
>
> > Use per-vma locks when reading /proc/pid/smaps and /proc/pid/numa_maps
> > similar to /proc/pid/maps to reduce contention on central mmap_lock.
>
> Was the benefit measured/measurable?
>
> Sashiko doesn't like your strchr():
> https://sashiko.dev/#/patchset/20260426062718.1238437-1-surenb@xxxxxxxxxx
Sorry, missed your comment earlier.
I think strchr() is fine here and Sashiko did notice that read_page()
always makes sure the buffer ends with a newline character, IOW
*end_pos == '\n'. So, once we found this last newline and moved past
it, we terminate the loop. I guess Sashiko is being overprotective...