Skip to content

Commit 2484be0

Browse files
Muchun Songtorvalds
authored andcommitted
mm/page_isolation: do not isolate the max order page
A max order page has no buddy page and never merges to another order. So isolating and then freeing it is pointless. Link: https://lkml.kernel.org/r/20201202122114.75316-1-songmuchun@bytedance.com Fixes: 3c60509 ("mm/page_alloc: restrict max order of merging on isolated pageblock") Signed-off-by: Muchun Song <songmuchun@bytedance.com> Reviewed-by: Andrew Morton <akpm@linux-foundation.org> Acked-by: Vlastimil Babka <vbabka@suse.cz> Reviewed-by: David Hildenbrand <david@redhat.com> Reviewed-by: Oscar Salvador <osalvador@suse.de> Cc: Joonsoo Kim <iamjoonsoo.kim@lge.com> Cc: Matthew Wilcox <willy@infradead.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
1 parent 8d87d07 commit 2484be0

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

mm/page_isolation.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ static void unset_migratetype_isolate(struct page *page, unsigned migratetype)
8888
*/
8989
if (PageBuddy(page)) {
9090
order = buddy_order(page);
91-
if (order >= pageblock_order) {
91+
if (order >= pageblock_order && order < MAX_ORDER - 1) {
9292
pfn = page_to_pfn(page);
9393
buddy_pfn = __find_buddy_pfn(pfn, order);
9494
buddy = page + (buddy_pfn - pfn);

0 commit comments

Comments
 (0)