On 3/31/26 17:34, Alistair Popple wrote:
> Several HMM tests hardcode TWOMEG as the THP size. This is wrong on
> architectures where the PMD size is not 2MB such as arm64 with 64K base
> pages where THP is 512MB. Fix this by using read_pmd_pagesize() from
> vm_util instead.
> 
> While here also replace the custom file_read_ulong() helper used to
> parse the default hugetlbfs page size from /proc/meminfo with the
> existing default_huge_page_size() from vm_util.
> 
> [1] 
> https://lore.kernel.org/linux-mm/[email protected]/
> 
> Fixes: fee9f6d1b8df ("mm/hmm/test: add selftests for HMM")
> Fixes: 519071529d2a ("selftests/mm/hmm-tests: new tests for zone device THP 
> migration")
> Reported-by: Zenghui Yu <[email protected]>
> Closes: 
> https://lore.kernel.org/linux-mm/[email protected]/
> Signed-off-by: Alistair Popple <[email protected]>
> ---
>  tools/testing/selftests/mm/hmm-tests.c | 83 +++++---------------------
>  1 file changed, 16 insertions(+), 67 deletions(-)
> 

Reviewed-by: Balbir Singh <[email protected]>

Reply via email to