Re: [PATCH v4 0/7] read proc/pid/smaps_rollup under per-vma lock

From: Suren Baghdasaryan

Date: Sun Sep 13 2026 - 15:26:36 EST


On Sat, Sep 12, 2026 at 12:24 AM Andrew Morton
<akpm@xxxxxxxxxxxxxxxxxxxx> wrote:
>
> On Fri, 11 Sep 2026 12:41:38 -0700 Suren Baghdasaryan <surenb@xxxxxxxxxx> wrote:
>
> > proc/pid/smaps_rollup can be read using the combination of RCU and
> > VMA read locks, similar to proc/pid/{maps|smaps|numa_maps}. RCU is
> > required to safely traverse the VMA tree and VMA lock stabilizes the
> > VMA being processed and the pagetable walk.
> > Note that we have to keep the logic to drop mmap_lock on contention
> > because even when using per-VMA locks we might have to fall back to
> > holding the mmap_lock.
>
> Nice. Queued, thanks.
>
> The speedups described in [6/7] are significant, although I don't know
> how representative Paul's tests are. Probably not very.
>
> So I don't know how much improvement our users will be seeing from
> these changes?
>
> And I don't know how much usage smaps_rollup gets in the real world?
>
>
> As I've no doubt you know, Sashiko is saying things. About these
> patches and about the current code. Its pre-existing
> clear_soft_dirty_pmd() driveby find looks significant.
>
> https://sashiko.dev/#/patchset/20260911194145.1781926-1-surenb@xxxxxxxxxx

Thanks! I'll investigate the preexisting ones and will try to fix the
ones that look real.