]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
mm/huge_memory: add new_order and offset to split_huge_pages*() pr_debug
authorZi Yan <ziy@nvidia.com>
Mon, 18 Aug 2025 18:46:18 +0000 (14:46 -0400)
committerAndrew Morton <akpm@linux-foundation.org>
Sat, 13 Sep 2025 23:55:11 +0000 (16:55 -0700)
Patch series "Better split_huge_page_test result check", v5.

This patchset uses kpageflags to get after-split folio orders for a better
split_huge_page_test result check[1].  The added
gather_after_split_folio_orders() scans through a VPN range and collects
the numbers of folios at different orders.
check_after_split_folio_orders() compares the result of
gather_after_split_folio_orders() to a given list of numbers of different
orders.

This patchset also adds new order and in folio offset to the split huge
page debugfs's pr_debug()s;

This patch (of 5):

They are useful information for debugging split huge page tests.

Link: https://lkml.kernel.org/r/20250818184622.1521620-1-ziy@nvidia.com
Link: https://lkml.kernel.org/r/20250818184622.1521620-2-ziy@nvidia.com
Signed-off-by: Zi Yan <ziy@nvidia.com>
Reviewed-by: Wei Yang <richard.weiyang@gmail.com>
Reviewed-by: Donet Tom <donettom@linux.ibm.com>
Reviewed-by: wang lian <lianux.mm@gmail.com>
Reviewed-by: Baolin Wang <baolin.wang@linux.alibaba.com>
Reviewed-by: Barry Song <baohua@kernel.org>
Acked-by: David Hildenbrand <david@redhat.com>
Cc: Dev Jain <dev.jain@arm.com>
Cc: Liam Howlett <liam.howlett@oracle.com>
Cc: Lorenzo Stoakes <lorenzo.stoakes@oracle.com>
Cc: Mariano Pache <npache@redhat.com>
Cc: Michal Hocko <mhocko@suse.com>
Cc: Mike Rapoport <rppt@kernel.org>
Cc: Ryan Roberts <ryan.roberts@arm.com>
Cc: Shuah Khan <shuah@kernel.org>
Cc: Suren Baghdasaryan <surenb@google.com>
Cc: Vlastimil Babka <vbabka@suse.cz>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
mm/huge_memory.c

index aac5f0a2cb54043f820f28ad493905ed98bca5b0..2a47cd3bb649e36018840a742bb7bf39ae2f2e9f 100644 (file)
@@ -4320,8 +4320,8 @@ static int split_huge_pages_pid(int pid, unsigned long vaddr_start,
                goto out;
        }
 
-       pr_debug("Split huge pages in pid: %d, vaddr: [0x%lx - 0x%lx]\n",
-                pid, vaddr_start, vaddr_end);
+       pr_debug("Split huge pages in pid: %d, vaddr: [0x%lx - 0x%lx], new_order: %u, in_folio_offset: %ld\n",
+                pid, vaddr_start, vaddr_end, new_order, in_folio_offset);
 
        mmap_read_lock(mm);
        /*
@@ -4431,8 +4431,8 @@ static int split_huge_pages_in_file(const char *file_path, pgoff_t off_start,
        if (IS_ERR(candidate))
                goto out;
 
-       pr_debug("split file-backed THPs in file: %s, page offset: [0x%lx - 0x%lx]\n",
-                file_path, off_start, off_end);
+       pr_debug("split file-backed THPs in file: %s, page offset: [0x%lx - 0x%lx], new_order: %u, in_folio_offset: %ld\n",
+                file_path, off_start, off_end, new_order, in_folio_offset);
 
        mapping = candidate->f_mapping;
        min_order = mapping_min_folio_order(mapping);