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

From: Andrew Morton

Date: Fri Sep 18 2026 - 12:17:58 EST


On Fri, 18 Sep 2026 08:33:11 -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.
>
> The first 5 patches are cleanups making later change simpler. The main
> change is in patch 6. Patch 7 extends existing proc-maps-race tearing
> test to verify smaps_rollup content.

Thanks, I added this to mm.git's mm-new branch.