[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <a813aa51-cc5c-4375-9146-31699b4be4ca@lucifer.local>
Date: Mon, 27 Oct 2025 16:38:05 +0000
From: Lorenzo Stoakes <lorenzo.stoakes@...cle.com>
To: David Hildenbrand <david@...hat.com>
Cc: Jason Gunthorpe <jgg@...pe.ca>, Gregory Price <gourry@...rry.net>,
Andrew Morton <akpm@...ux-foundation.org>,
Christian Borntraeger <borntraeger@...ux.ibm.com>,
Janosch Frank <frankja@...ux.ibm.com>,
Claudio Imbrenda <imbrenda@...ux.ibm.com>,
Alexander Gordeev <agordeev@...ux.ibm.com>,
Gerald Schaefer <gerald.schaefer@...ux.ibm.com>,
Heiko Carstens <hca@...ux.ibm.com>, Vasily Gorbik <gor@...ux.ibm.com>,
Sven Schnelle <svens@...ux.ibm.com>, Zi Yan <ziy@...dia.com>,
Baolin Wang <baolin.wang@...ux.alibaba.com>,
"Liam R . Howlett" <Liam.Howlett@...cle.com>,
Nico Pache <npache@...hat.com>, Ryan Roberts <ryan.roberts@....com>,
Dev Jain <dev.jain@....com>, Barry Song <baohua@...nel.org>,
Lance Yang <lance.yang@...ux.dev>,
Kemeng Shi <shikemeng@...weicloud.com>,
Kairui Song <kasong@...cent.com>, Nhat Pham <nphamcs@...il.com>,
Baoquan He <bhe@...hat.com>, Chris Li <chrisl@...nel.org>,
Peter Xu <peterx@...hat.com>, Matthew Wilcox <willy@...radead.org>,
Leon Romanovsky <leon@...nel.org>, Muchun Song <muchun.song@...ux.dev>,
Oscar Salvador <osalvador@...e.de>, Vlastimil Babka <vbabka@...e.cz>,
Mike Rapoport <rppt@...nel.org>,
Suren Baghdasaryan <surenb@...gle.com>, Michal Hocko <mhocko@...e.com>,
Jann Horn <jannh@...gle.com>, Matthew Brost <matthew.brost@...el.com>,
Joshua Hahn <joshua.hahnjy@...il.com>, Rakie Kim <rakie.kim@...com>,
Byungchul Park <byungchul@...com>,
Ying Huang <ying.huang@...ux.alibaba.com>,
Alistair Popple <apopple@...dia.com>, Pedro Falcato <pfalcato@...e.de>,
Pasha Tatashin <pasha.tatashin@...een.com>,
Rik van Riel <riel@...riel.com>, Harry Yoo <harry.yoo@...cle.com>,
kvm@...r.kernel.org, linux-s390@...r.kernel.org,
linux-kernel@...r.kernel.org, linux-fsdevel@...r.kernel.org,
linux-mm@...ck.org
Subject: Re: [RFC PATCH 05/12] fs/proc/task_mmu: refactor pagemap_pmd_range()
On Mon, Oct 27, 2025 at 05:31:54PM +0100, David Hildenbrand wrote:
> >
> > I don't love the union.
> >
> > How would we determine what type it is, we'd have to have some
> > generic_leaf_entry_t type or something to contain the swap type field and then
> > cast and... is it worth it?
> >
> > Intent of non-present was to refer to not-swap swapentry. It's already a
> > convention that exists, e.g. is_pmd_non_present_folio_entry().
>
> Just noting that this was a recent addition (still not upstream) that
> essentially says "there is a folio here, but it's not in an ordinary present
> page table entry.
>
> So we could change that to something better.
Yeah but leaf_entry_t encapsulates BOTH swap and non-swap entries.
So that's nice.
What do you propose calling non-swap leaf entries? It starts spiralling down a
bit there.
And it's really common to have logic asserting it's actually a swap entry
vs. not etc.
I think we need to separate out what's practical for this series and what's
ideal going forwards.
Right now it's a complete mess, I don't want this to turn into a talking shop
that bogs things down so we don't move forward because it doesn't address
everything all at once.
What we have here already improves things dramatically IMO.
So what I propose is:
1. we keep the non-present terminology as a better way of referring to non-swap
entries.
2. When I come to do the leaf_entry_t series, we can generalise and no longer
differentiate between swap + non-swap.
We can then resume the discussion re: type there.
>
> --
> Cheers
>
> David / dhildenb
>
THanks, Lorenzo
Powered by blists - more mailing lists