mm: show page state if isolation is failed
authorCho KyongHo <pullip.cho@samsung.com>
Fri, 9 Jun 2017 13:32:44 +0000 (22:32 +0900)
committerCosmin Tanislav <demonsingur@gmail.com>
Mon, 22 Apr 2024 17:23:00 +0000 (20:23 +0300)
alloc_contig_range() shows the following message to the kernel log if
isolation of the given page ranges has been failed:
"__alloc_contig_range: [8fcd00, 900000) PFNs busy"

But the message provides no information but isolation of some pages in
that range is failed.
If isolation of specific pages is failed repeatedly, we should find
the reason. Identifying the state of pages that are not isolated is
very important to start solving the failure.

Change-Id: I83fa34f9c49989076e1ba20f5b92c570bdd180c0
Signed-off-by: Cho KyongHo <pullip.cho@samsung.com>
mm/page_isolation.c

index 44f213935bf68722eb85271520faa6b7581ed3c6..979451ed2e6ddab9438cee833f2e7c470a54f0a5 100644 (file)
@@ -286,6 +286,12 @@ int test_pages_isolated(unsigned long start_pfn, unsigned long end_pfn,
        spin_lock_irqsave(&zone->lock, flags);
        pfn = __test_page_isolated_in_pageblock(start_pfn, end_pfn,
                                                skip_hwpoisoned_pages);
+
+       if (pfn < end_pfn) {
+               pr_info("%s: page of pfn %lu is not isolated\n", __func__, pfn);
+               __dump_page(pfn_to_page(pfn), "isolation failure");
+       }
+
        spin_unlock_irqrestore(&zone->lock, flags);
 
        trace_test_pages_isolated(start_pfn, end_pfn, pfn);