Skip to content

hugetlb: normalize exported interfaces to use base-page indices

Jane Chu linux-doc linux-mm lkml syzbot 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest6 patches 20 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/6hugetlb: open-code hugetlb folio lookup index conversionfs/hugetlbfs/inode.c include/linux/hugetlb.h mm/hugetlb.c+12 -247 replies
2/6hugetlb: remove the hugetlb_linear_page_index() helperinclude/linux/hugetlb.h mm/userfaultfd.c+2 -181 reply
3/6hugetlb: make hugetlb_fault_mutex_hash() take PAGE_SIZE indexfs/hugetlbfs/inode.c mm/hugetlb.c mm/memfd.c +1 more+38 -274 replies
4/6hugetlb: drop vma_hugecache_offset() in favor of linear_page_index()mm/hugetlb.c+21 -282 replies
5/6hugetlb: make hugetlb_add_to_page_cache() use PAGE_SIZE-based indexfs/hugetlbfs/inode.c include/linux/hugetlb.h mm/hugetlb.c +1 more+11 -161 reply
6/6hugetlb: pass hugetlb reservation ranges in base-page indicesDocumentation/mm/hugetlbfs_reserv.rst fs/hugetlbfs/inode.c mm/hugetlb.c +1 more+42 -342 replies

Reviews trailers per patch

3 of 6 patches have a Reviewed-by or Acked-by.

PatchOscar Salvador
1/6A-b
2/6A-b
3/6
4/6
5/6A-b
6/6

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v1 thread

Cover letter [PATCH 0/6] hugetlb: normalize exported interfaces to use base-page indices

This series stems from a discussion with David. [1]
The series makes a small cleanup to a few hugetlb interfaces used outside the subsystem by standardizing them on base-page indices. Hopefully this makes the interface semantics a bit more coherent with the rest of mm, while the internal hugetlb code continue to use hugepage indices where that remains the more natural fit.

It is based off mm-stable, 3/30/2026, b2c31180b9d6.

[1] https://lore.kernel.org/linux-mm/[email protected]/

Jane Chu (6):
hugetlb: open-code hugetlb folio lookup index conversion
hugetlb: remove the hugetlb_linear_page_index() helper
hugetlb: make hugetlb_fault_mutex_hash() take PAGE_SIZE index
hugetlb: drop vma_hugecache_offset() in favor of linear_page_index()
hugetlb: make hugetlb_add_to_page_cache() use PAGE_SIZE-based index
hugetlb: pass hugetlb reservation ranges in base-page indices

 Documentation/mm/hugetlbfs_reserv.rst |  12 +--
 fs/hugetlbfs/inode.c                  |  60 +++++++-------
 include/linux/hugetlb.h               |  31 +------
 mm/hugetlb.c                          | 112 ++++++++++++++------------
 mm/memfd.c                            |  18 +++--
 mm/userfaultfd.c                      |   6 +-
 6 files changed, 109 insertions(+), 130 deletions(-)
Signature · 1 line
2.43.5