linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
* [RFC v2 0/2] change ->index to PAGE_SIZE for hugetlb pages
@ 2023-05-19 22:01 Sidhartha Kumar
  2023-05-19 22:01 ` [RFC v2 1/2] mm/filemap: remove hugetlb special casing in filemap.c Sidhartha Kumar
  2023-05-19 22:01 ` [RFC v2 2/2] mm/hugetlb: add wrapper functions for interactions with page cache Sidhartha Kumar
  0 siblings, 2 replies; 3+ messages in thread
From: Sidhartha Kumar @ 2023-05-19 22:01 UTC (permalink / raw)
  To: linux-kernel, linux-mm
  Cc: akpm, songmuchun, mike.kravetz, willy, david, nphamcs, Sidhartha Kumar

This RFC patchset attempts to implement a listed filemap TODO which is
changing hugetlb folios to have ->index in PAGE_SIZE. This simplifies many
functions within filemap.c as they have to special case hugetlb pages.
From the last RFC[1], Mike pointed out that hugetlb will have to maintain
a huge page sized index as well because it is used for the reservation
map as well as the hash function for the hugetlb mutex table.

This patchset adds new wrappers for hugetlb code to to interact with the
page cache. These wrappers calculate a linear page index as this is now
what the page cache expects for hugetlb pages as well.

This series passes the LTP hugetlb test cases. I will do more testing
and performance analysis but wanted to get some early feedback if this
approach is acceptable.

[1]:https://lore.kernel.org/lkml/20230425012721.GA6696@monkey/T/

Sidhartha Kumar (2):
  mm/filemap: remove hugetlb special casing in filemap.c
  mm/hugetlb: add wrapper functions for interactions with page cache

 fs/hugetlbfs/inode.c    | 14 +++++++-------
 include/linux/hugetlb.h | 21 +++++++++++++++++++--
 include/linux/pagemap.h |  8 --------
 mm/filemap.c            | 36 +++++++++++-------------------------
 mm/hugetlb.c            | 22 +++++++++++++---------
 5 files changed, 50 insertions(+), 51 deletions(-)

-- 
2.40.1



^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2023-05-19 22:02 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-05-19 22:01 [RFC v2 0/2] change ->index to PAGE_SIZE for hugetlb pages Sidhartha Kumar
2023-05-19 22:01 ` [RFC v2 1/2] mm/filemap: remove hugetlb special casing in filemap.c Sidhartha Kumar
2023-05-19 22:01 ` [RFC v2 2/2] mm/hugetlb: add wrapper functions for interactions with page cache Sidhartha Kumar

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox