Re: [PATCH v2 4/7] mm/selftests: Fix split_huge_page_test failure on systems with 64KB page size

From: Dev Jain
Date: Thu Jul 03 2025 - 04:16:35 EST



On 03/07/25 11:36 am, Aboorva Devarajan wrote:
From: Donet Tom <donettom@xxxxxxxxxxxxx>

The split_huge_page_test fails on systems with a 64KB base page size.
This is because the order of a 2MB huge page is different:

On 64KB systems, the order is 5.

On 4KB systems, it's 9.

The test currently assumes a maximum huge page order of 9, which is only
valid for 4KB base page systems. On systems with 64KB pages, attempting
to split huge pages beyond their actual order (5) causes the test to fail.

In this patch, we calculate the huge page order based on the system's base
page size. With this change, the tests now run successfully on both 64KB
and 4KB page size systems.

Fixes: fa6c02315f745 ("mm: huge_memory: a new debugfs interface for splitting THP tests")
Signed-off-by: Donet Tom <donettom@xxxxxxxxxxxxx>
Signed-off-by: Aboorva Devarajan <aboorvad@xxxxxxxxxxxxx>
---

LGTM

Reviewed-by: Dev Jain <dev.jain@xxxxxxx>