[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20220530115027.123341-1-anshuman.khandual@arm.com>
Date: Mon, 30 May 2022 17:20:27 +0530
From: Anshuman Khandual <anshuman.khandual@....com>
To: linux-mm@...ck.org
Cc: Anshuman Khandual <anshuman.khandual@....com>,
Andrew Morton <akpm@...ux-foundation.org>,
Zi Yan <ziy@...dia.com>, linux-kernel@...r.kernel.org
Subject: [RFC] mm/page_isolation: Fix an infinite loop in isolate_single_pageblock()
HugeTLB allocation (32MB pages on 4K base page) via sysfs on arm64 platform
is getting stuck in isolate_single_pageblock(), because of an infinite loop
Because head_pfn always evaluate the same, so does pfn, and the outer loop
never exits. Dropping the relevant code block, which seems redundant, makes
the problem go away.
Cc: Andrew Morton <akpm@...ux-foundation.org>
Cc: Zi Yan <ziy@...dia.com>
Cc: linux-mm@...ck.org
Cc: linux-kernel@...r.kernel.org
Fixes: b2c9e2fbba32 ("mm: make alloc_contig_range work at pageblock granularity")
Signed-off-by: Anshuman Khandual <anshuman.khandual@....com>
---
I am not sure about this fix, and also did not find much time today to
debug any further. There are much code changes around this function in
recent days. This problem is present on latest mainline kernel.
- Anshuman
mm/page_isolation.c | 4 ----
1 file changed, 4 deletions(-)
diff --git a/mm/page_isolation.c b/mm/page_isolation.c
index 6021f8444b5a..b0922fee75c1 100644
--- a/mm/page_isolation.c
+++ b/mm/page_isolation.c
@@ -389,10 +389,6 @@ static int isolate_single_pageblock(unsigned long boundary_pfn, int flags,
struct page *head = compound_head(page);
unsigned long head_pfn = page_to_pfn(head);
- if (head_pfn + nr_pages <= boundary_pfn) {
- pfn = head_pfn + nr_pages;
- continue;
- }
#if defined CONFIG_COMPACTION || defined CONFIG_CMA
/*
* hugetlb, lru compound (THP), and movable compound pages
--
2.20.1
Powered by blists - more mailing lists