Re: [PATCH 1/6] hugetlb: open-code hugetlb folio lookup index conversion

Matthew Wilcox
2026-04-23T14:56:03Z

On Wed, Apr 22, 2026 at 09:44:40AM -0700, jane.chu@oracle.com wrote:
> Thanks Matthew, these are great suggestions and I am looking into them.
> Main concern is potential performance impact, will find out.

I doubt we'll see any performance impact to be honest. We're doing a
small amount of extra work, but these are not commonly used code paths
and I can't imagine we'll notice it on any benchmark. This is about
cleanup; a pgoff_t is supposed to be a file position divided by PAGE_SIZE.
Hugetlb mostly doesn't do that, it indexes in hpage_size() which it
doesn't need to do any more. It's confusing for people coming to hugetlb
from other parts of the kernel, so it really needs to be cleaned up.