selftests/mm: fix split_huge_page_test for folio_split() tests
PID_FMT does not have an offset field, so folio_split() tests are not
performed. Add PID_FMT_OFFSET with an offset field and use it to perform
folio_split() tests.
Link: https://lkml.kernel.org/r/20250709012800.3225727-1-ziy@nvidia.com
Fixes: 80a5c494c8 ("selftests/mm: add tests for folio_split(), buddy allocator like split")
Signed-off-by: Zi Yan <ziy@nvidia.com>
Tested-by: Baolin Wang <baolin.wang@linux.alibaba.com>
Reviewed-by: Lorenzo Stoakes <lorenzo.stoakes@oracle.com>
Reviewed-by: Donet Tom <donettom@linux.ibm.com>
Tested-by : Donet Tom <donettom@linux.ibm.com>
Cc: Barry Song <baohua@kernel.org>
Cc: David Hildenbrand <david@redhat.com>
Cc: Dev Jain <dev.jain@arm.com>
Cc: Liam Howlett <liam.howlett@oracle.com>
Cc: Mariano Pache <npache@redhat.com>
Cc: Ryan Roberts <ryan.roberts@arm.com>
Cc: Shuah Khan <shuah@kernel.org>
Cc: <stable@vger.kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
This commit is contained in:
@@ -31,6 +31,7 @@ uint64_t pmd_pagesize;
|
||||
#define INPUT_MAX 80
|
||||
|
||||
#define PID_FMT "%d,0x%lx,0x%lx,%d"
|
||||
#define PID_FMT_OFFSET "%d,0x%lx,0x%lx,%d,%d"
|
||||
#define PATH_FMT "%s,0x%lx,0x%lx,%d"
|
||||
|
||||
#define PFN_MASK ((1UL<<55)-1)
|
||||
@@ -483,7 +484,7 @@ void split_thp_in_pagecache_to_order_at(size_t fd_size, const char *fs_loc,
|
||||
write_debugfs(PID_FMT, getpid(), (uint64_t)addr,
|
||||
(uint64_t)addr + fd_size, order);
|
||||
else
|
||||
write_debugfs(PID_FMT, getpid(), (uint64_t)addr,
|
||||
write_debugfs(PID_FMT_OFFSET, getpid(), (uint64_t)addr,
|
||||
(uint64_t)addr + fd_size, order, offset);
|
||||
|
||||
for (i = 0; i < fd_size; i++)
|
||||
|
||||
Reference in New Issue
Block a user