We've been kind of hacking piecemeal at converting khugepaged to use folios instead of compound pages, and so this patchset is a little larger than it should be as I undo some of our wrong moves in the past. In particular, collapse_file() now consistently uses 'new_folio' for the freshly allocated folio and 'folio' for the one that's currently in use. Matthew Wilcox (Oracle) (7): khugepaged: Inline hpage_collapse_alloc_folio() khugepaged: Convert alloc_charge_hpage to alloc_charge_folio khugepaged: Remove hpage from collapse_huge_page() khugepaged: Pass a folio to __collapse_huge_page_copy() khugepaged: Remove hpage from collapse_file() khugepaged: Use a folio throughout collapse_file() khugepaged: Use a folio throughout hpage_collapse_scan_file() include/trace/events/huge_memory.h | 12 +- mm/khugepaged.c | 293 +++++++++++++---------------- 2 files changed, 142 insertions(+), 163 deletions(-) -- 2.43.0