[PATCH 0/2] kpageflags: fix wrong KPF_THP on non-pmd-mappable compound pages
From: ran xiaokai
Date: Tue Jun 25 2024 - 22:51:13 EST
From: Ran Xiaokai <ran.xiaokai@xxxxxxxxxx>
KPF_THP means that the folio is a 2M pmd mappable compound page,
meanwhile KPF_COMPOUND_HEAD and KPF_COMPOUND_TAIL are used to
indicate common compound pages, so after commit 19eaf44954df
("mm: thp: support allocation of anonymous multi-size THP"),
the folio_test_large() in stable_page_flags() is insufficient
and should be replaced with folio_test_pmd_mappable().
Patch1 is a preparation to solve the compile time warning introduced
by patch2.
Patch2 replaces folio_test_large() with folio_test_pmd_mappable() to
indicate KPF_THP for only pmd mappable THP.
Ran Xiaokai (2):
mm: Constify folio_order()/folio_test_pmd_mappable()
kpageflags: fix wrong KPF_THP on non-pmd-mappable compound pages
fs/proc/page.c | 14 ++++----------
include/linux/huge_mm.h | 2 +-
include/linux/mm.h | 2 +-
3 files changed, 6 insertions(+), 12 deletions(-)
--
2.15.2