On 9/8/26 8:50 PM, Kiryl Shutsemau wrote:
From: "Kiryl Shutsemau (Meta)" <[email protected]>

Checking that an address range is backed by a folio of a given order is
useful to any test that builds or collapses large folios.  mTHP collapse
coverage in the khugepaged selftest needs exactly that.

split_huge_page_test.c already has the building block:
is_backed_by_folio() reads the compound head and tail flags from
/proc/kpageflags to classify the folio behind a page.

Move it into vm_util so other tests can use it.  No functional change.

Assisted-by: LLM
Acked-by: Mike Rapoport (Microsoft) <[email protected]>
Acked-by: Lorenzo Stoakes (ARM) <[email protected]>
Tested-by: Muhammad Usama Anjum <[email protected]>
Signed-off-by: Kiryl Shutsemau (Meta) <[email protected]>
---

LGTM.
Reviewed-by: Baolin Wang <[email protected]>

Reply via email to