]> git.karo-electronics.de Git - karo-tx-linux.git/blobdiff - mm/page_alloc.c
mm: memory-hotplug: enable memory hotplug to handle hugepage
[karo-tx-linux.git] / mm / page_alloc.c
index 7c3f8d7e2d8ea60ae44520485ff85ea62a377b72..f7cc08dad26a1b1eedacabc2dfba7bb704bc61da 100644 (file)
@@ -6008,6 +6008,17 @@ bool has_unmovable_pages(struct zone *zone, struct page *page, int count,
                        continue;
 
                page = pfn_to_page(check);
+
+               /*
+                * Hugepages are not in LRU lists, but they're movable.
+                * We need not scan over tail pages bacause we don't
+                * handle each tail page individually in migration.
+                */
+               if (PageHuge(page)) {
+                       iter = round_up(iter + 1, 1<<compound_order(page)) - 1;
+                       continue;
+               }
+
                /*
                 * We can't use page_count without pin a page
                 * because another CPU can free compound page.