[RFC PATCH 0/4] change ->index to PAGE_SIZE for hugetlb pages

From: Sidhartha Kumar
Date: Thu Apr 13 2023 - 19:15:31 EST


This RFC patch series attempts to simplify the page cache code by removing
special casing code for hugetlb pages. Normal pages in the page cache are
indexed by PAGE_SIZE while hugetlb pages are indexed by their huge page
size. This was previously tried but the xarray was not performant enough
for the changes.

This series fails many of the hugetlb LTP test cases due to bugs in
accounting and I was hoping to get help/suggestions about why the page
accounting breaks from my changes. The basic mmap tests pass but the
advanced ones which involve overcommiting pages fail.

rebased on mm-unstable 4/13/2023

Sidhartha Kumar (4):
mm/filemap: remove hugetlb special casing in filemap.c
mm/hugetlb: remove hugetlb_basepage_index()
mm/hugetlbfs: remove huge_page_shift in hugetlbfs_file_mmap
mm/hugetlb: add hpage_shift to alloc_hugetlb_folio

fs/hugetlbfs/inode.c | 4 +--
include/linux/pagemap.h | 13 --------
mm/filemap.c | 36 +++++++---------------
mm/hugetlb.c | 68 ++++++++++++-----------------------------
4 files changed, 33 insertions(+), 88 deletions(-)

--
2.39.2