[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <aGVyIZby0mCBz0Yl@localhost.localdomain>
Date: Wed, 2 Jul 2025 19:53:37 +0200
From: Oscar Salvador <osalvador@...e.de>
To: David Hildenbrand <david@...hat.com>
Cc: linux-kernel@...r.kernel.org, linux-mm@...ck.org,
Andrew Morton <akpm@...ux-foundation.org>,
"Liam R. Howlett" <Liam.Howlett@...cle.com>,
Lorenzo Stoakes <lorenzo.stoakes@...cle.com>,
Vlastimil Babka <vbabka@...e.cz>, Jann Horn <jannh@...gle.com>,
Mike Rapoport <rppt@...nel.org>,
Suren Baghdasaryan <surenb@...gle.com>,
Michal Hocko <mhocko@...e.com>, Zi Yan <ziy@...dia.com>,
Matthew Brost <matthew.brost@...el.com>,
Joshua Hahn <joshua.hahnjy@...il.com>, Rakie Kim <rakie.kim@...com>,
Byungchul Park <byungchul@...com>,
Gregory Price <gourry@...rry.net>,
Ying Huang <ying.huang@...ux.alibaba.com>,
Alistair Popple <apopple@...dia.com>,
Pedro Falcato <pfalcato@...e.de>, Rik van Riel <riel@...riel.com>,
Harry Yoo <harry.yoo@...cle.com>, Lance Yang <ioworker0@...il.com>
Subject: Re: [PATCH v2 4/4] mm: remove boolean output parameters from
folio_pte_batch_ext()
On Wed, Jul 02, 2025 at 04:40:30PM +0200, David Hildenbrand wrote:
> But more importantly, usually young+dirty is a moving target as HW can
> usually update it asynchronously.
Ok, you mean they often get queried both at once?
> So in the common case, you really have to rely on the young+dirty bits from
> get_and_clear_full_ptes(), and not on the current snapshot while the page
> remains mapped.
>
> The madvise() use case is rather special in that sense.
I see.
I mean, codewise this looks like an improvement, I was just puzzled by the
fact that we're dealing with young+dirty together (while we didn't before),
but given that get_and_clear_full_ptes() do that already, I guess it makes
sense if that's the way we usually operate.
I wasn't familiar with that, thinking about it makes sense, but I wonder whether
we could place a comment either in the definition of FPB_MERGE_YOUNG_DIRTY, or in
the handling of it in folio_pte_batch_flags().
I guess in the definition would make more sense.
Whether you decide to move forward on the comment or not (could be
squashed), I'm ok with this.
--
Oscar Salvador
SUSE Labs
Powered by blists - more mailing lists