From: "Lorenzo Stoakes (ARM)" <ljs@kernel.org>
To: "Liam R. Howlett" <liam@infradead.org>
Cc: "David Hildenbrand (Arm)" <david@kernel.org>,
Suren Baghdasaryan <surenb@google.com>,
Andrew Morton <akpm@linux-foundation.org>,
Vlastimil Babka <vbabka@kernel.org>,
Jann Horn <jannh@google.com>, Pedro Falcato <pfalcato@suse.de>,
Shakeel Butt <shakeel.butt@linux.dev>,
linux-kernel@vger.kernel.org, linux-mm@kvack.org,
stable@vger.kernel.org
Subject: Re: [PATCH] fs/proc/task_mmu: fix missed VMAs when reading /proc/PID/maps and friends
Date: Mon, 26 Oct 2026 18:05:03 +0000 [thread overview]
Message-ID: <at-WKy_zj2SYUhBa@gremlin> (raw)
In-Reply-To: <ft4q2mxxiihpvc6wjs2pyku6fvfqg5r4brpgjvz4ikkeh7vwff@s6h5k2dxstk2>
On Mon, Oct 26, 2026 at 02:01:47PM -0400, Liam R. Howlett wrote:
> On 26/10/26 05:26PM, Lorenzo Stoakes (ARM) wrote:
> > On Mon, Oct 26, 2026 at 06:19:18PM +0100, David Hildenbrand (Arm) wrote:
> > > >> + /*
> > > >> + * No lock was held since the last call, so the iterator's cached range
> > > >> + * may no longer be valid. Always restart by address.
> > > >> + *
> > > >> + * The vma_range_is_empty() checks below avoid unnecessary mmap_lock
> > > >> + * fallbacks.
> > > >> + */
> > > >> + vma_iter_set(vmi, from_addr);
> > > >
> > > > This is clearly simpler but this unconditional vmi reset is not ideal.
> > >
> > > Yes, exactly how I ended up where we am right now.
> > >
> > > I pref my current fix as something to backport that avoids performance changes.
> > >
> > > If you two disagree, please take it over and drag it over the finishing line in
> > > a timely manner.
> > >
> > > I wasted enough of my weekend with this over-enginered piece of software. (had
> > > to change one word before sending, can you guess which :P )
> >
> > No problem, will take over.
> >
>
> Just a follow-up, another option: the vma iterator can check the
> previous end from vm_end and set the maple state to the range of the
> current vma if they disagree. Using the set_range() and not
> __set_range(), so the next walk will be a new walk immediately.
Ack, as discussed will give that a go and see how it looks taking on board
Suren's feedback also! :)
--
Cheers, Lorenzo
prev parent reply other threads:[~2026-10-26 18:05 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-25 10:43 [PATCH] fs/proc/task_mmu: fix missed VMAs when reading /proc/PID/maps and friends David Hildenbrand (Arm)
2026-10-25 14:55 ` Suren Baghdasaryan
2026-10-25 19:01 ` Jose A. Perez de Azpillaga
2026-10-26 10:04 ` David Hildenbrand (Arm)
2026-10-26 15:56 ` Andrew Morton
2026-10-26 13:35 ` Lorenzo Stoakes (ARM)
2026-10-26 13:38 ` Lorenzo Stoakes (ARM)
2026-10-26 16:16 ` Suren Baghdasaryan
2026-10-26 17:19 ` David Hildenbrand (Arm)
2026-10-26 17:26 ` Lorenzo Stoakes (ARM)
2026-10-26 18:01 ` Liam R. Howlett
2026-10-26 18:05 ` Lorenzo Stoakes (ARM) [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=at-WKy_zj2SYUhBa@gremlin \
--to=ljs@kernel.org \
--cc=akpm@linux-foundation.org \
--cc=david@kernel.org \
--cc=jannh@google.com \
--cc=liam@infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=pfalcato@suse.de \
--cc=shakeel.butt@linux.dev \
--cc=stable@vger.kernel.org \
--cc=surenb@google.com \
--cc=vbabka@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.