[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <ZsySf2F9djR5YVOr@x1n>
Date: Mon, 26 Aug 2024 10:34:39 -0400
From: Peter Xu <peterx@...hat.com>
To: LEROY Christophe <christophe.leroy2@...soprasteria.com>
Cc: "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
"linux-mm@...ck.org" <linux-mm@...ck.org>,
Vlastimil Babka <vbabka@...e.cz>,
David Hildenbrand <david@...hat.com>,
Oscar Salvador <osalvador@...e.de>,
"linux-s390@...r.kernel.org" <linux-s390@...r.kernel.org>,
Andrew Morton <akpm@...ux-foundation.org>,
Matthew Wilcox <willy@...radead.org>,
Dan Williams <dan.j.williams@...el.com>,
Michal Hocko <mhocko@...nel.org>,
"linux-riscv@...ts.infradead.org" <linux-riscv@...ts.infradead.org>,
"sparclinux@...r.kernel.org" <sparclinux@...r.kernel.org>,
Alex Williamson <alex.williamson@...hat.com>,
Jason Gunthorpe <jgg@...dia.com>, "x86@...nel.org" <x86@...nel.org>,
Alistair Popple <apopple@...dia.com>,
"linuxppc-dev@...ts.ozlabs.org" <linuxppc-dev@...ts.ozlabs.org>,
"linux-arm-kernel@...ts.infradead.org" <linux-arm-kernel@...ts.infradead.org>,
Ryan Roberts <ryan.roberts@....com>,
Hugh Dickins <hughd@...gle.com>,
Axel Rasmussen <axelrasmussen@...gle.com>
Subject: Re: [PATCH RFC 2/6] mm: PGTABLE_HAS_P[MU]D_LEAVES config options
On Fri, Aug 23, 2024 at 06:19:52AM +0000, LEROY Christophe wrote:
> Why is an option needed for that ? If pmd_leaf() returns always false,
> it means the arch doesn't support pmd mappings and if properly used all
> related code should fold away without a config option, shouldn't it ?
It's not always easy to leverage an "if" clause there, IIUC. Take the case
of when a driver wants to inject a pmd pfnmap, we may want something like:
if (pmd_leaf_supported())
inject_pmd_leaf(&pmd);
We don't have a pmd entry to reference at the point of pmd_leaf_supported()
when making the decision.
Thanks,
--
Peter Xu
Powered by blists - more mailing lists