Re: [PATCH v2 04/13] mm: Make HPAGE_PXD_* macros even if !THP

2024-01-15 Thread Jason Gunthorpe
On Wed, Jan 03, 2024 at 05:14:14PM +0800, pet...@redhat.com wrote: > From: Peter Xu > > These macros can be helpful when we plan to merge hugetlb code into generic > code. Move them out and define them even if !THP. > > We actually already defined HPAGE_PMD_NR for other reasons even if !THP. >

[PATCH v2 04/13] mm: Make HPAGE_PXD_* macros even if !THP

2024-01-03 Thread peterx
From: Peter Xu These macros can be helpful when we plan to merge hugetlb code into generic code. Move them out and define them even if !THP. We actually already defined HPAGE_PMD_NR for other reasons even if !THP. Reorganize these macros. Reviewed-by: Christoph Hellwig Signed-off-by: Peter Xu