]> www.infradead.org Git - users/dwmw2/linux.git/commit
hugetlb: convert hugetlb_vma_maps_page() to hugetlb_vma_maps_pfn()
authorMatthew Wilcox (Oracle) <willy@infradead.org>
Wed, 26 Feb 2025 16:31:29 +0000 (16:31 +0000)
committerAndrew Morton <akpm@linux-foundation.org>
Tue, 18 Mar 2025 05:06:58 +0000 (22:06 -0700)
commitfa17ad58f8328e5c089377fed55ca8ed62f7cd1d
tree6f87be552fb813f045b34f6fc1121a53e3153425
parentd9a04a2615c0b8767a42dc26a8c26383e8513cdc
hugetlb: convert hugetlb_vma_maps_page() to hugetlb_vma_maps_pfn()

pte_page() is more expensive than pte_pfn() (often it's defined as
pfn_to_page(pte_pfn())), so it makes sense to do the conversion to pfn
once (by calling folio_pfn()) rather than convert the pfn to a page each
time.

While this is a very small advantage, the main motivation is removing a
reference to folio->page.

Link: https://lkml.kernel.org/r/20250226163131.3795869-1-willy@infradead.org
Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
Cc: Muchun Song <muchun.song@linux.dev>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
fs/hugetlbfs/inode.c