On Thu, Nov 23, 2023 at 11:53:04AM +0200, Mike Rapoport wrote: > On Wed, Nov 22, 2023 at 11:23:57PM -0800, Christoph Hellwig wrote: > > No way to export macros :) > > > > I'd say define, but other might have better ideas. > > Make HPAGE_PXD_* macros visible even if !THP Sounds good, thanks both! Besides, I do plan to introduce a new macro in the next version to mean "THP || HUGETLB", so as to put PxD code segments into it and not compile when unnecessary (!THP && !HUGETLB). Currently what I had is: config PGTABLE_HAS_HUGE_LEAVES def_bool TRANSPARENT_HUGEPAGE || HUGETLB_PAGE I didn't use something like CONFIG_HUGE_PAGE because it's too close to HUGETLB_PAGE, even if generic and short enough. Please speak if there's any early comments on that, either the name or the format. For example, I can also define it in e.g. mm/internal.h, instead of a config entry. -- Peter Xu