Re: [PATCH] mm: Move nth_page from folio_page into folio_next

From: Matthew Wilcox
Date: Thu Mar 13 2025 - 08:26:43 EST


On Thu, Mar 13, 2025 at 12:40:34PM +0800, Herbert Xu wrote:
> Discontiguous memory may require the use of nth_page instead of adding
> to struct page arithmetically. However, discontiguous memory cannot
> exist within a single folio.

That isn't true. HugeTLB can construct a folio which crosses a
contiguity boundary.