aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVlastimil Babka <vbabka@suse.cz>2014-12-10 18:43:10 -0500
committerLinus Torvalds <torvalds@linux-foundation.org>2014-12-10 20:41:05 -0500
commitc05543293e0bf586842844c14fd8c598f494a107 (patch)
treef89bf7676c91ca2bbba569a73c1c29e282968152
parent510f550788b8aba5070c59ec652de8b4ab660852 (diff)
mm, memory_hotplug/failure: drain single zone pcplists
Memory hotplug and failure mechanisms have several places where pcplists are drained so that pages are returned to the buddy allocator and can be e.g. prepared for offlining. This is always done in the context of a single zone, we can reduce the pcplists drain to the single zone, which is now possible. The change should make memory offlining due to hotremove or failure faster and not disturbing unrelated pcplists anymore. Signed-off-by: Vlastimil Babka <vbabka@suse.cz> Cc: Naoya Horiguchi <n-horiguchi@ah.jp.nec.com> Cc: Mel Gorman <mgorman@suse.de> Cc: Rik van Riel <riel@redhat.com> Cc: Yasuaki Ishimatsu <isimatu.yasuaki@jp.fujitsu.com> Cc: Zhang Yanfei <zhangyanfei@cn.fujitsu.com> Cc: Xishi Qiu <qiuxishi@huawei.com> Cc: Vladimir Davydov <vdavydov@parallels.com> Cc: Joonsoo Kim <iamjoonsoo.kim@lge.com> Cc: Michal Nazarewicz <mina86@mina86.com> Cc: Marek Szyprowski <m.szyprowski@samsung.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
-rw-r--r--mm/memory-failure.c4
-rw-r--r--mm/memory_hotplug.c4
2 files changed, 4 insertions, 4 deletions
diff --git a/mm/memory-failure.c b/mm/memory-failure.c
index 851b4d7eef3a..84e7ded04321 100644
--- a/mm/memory-failure.c
+++ b/mm/memory-failure.c
@@ -233,7 +233,7 @@ void shake_page(struct page *p, int access)
233 lru_add_drain_all(); 233 lru_add_drain_all();
234 if (PageLRU(p)) 234 if (PageLRU(p))
235 return; 235 return;
236 drain_all_pages(NULL); 236 drain_all_pages(page_zone(p));
237 if (PageLRU(p) || is_free_buddy_page(p)) 237 if (PageLRU(p) || is_free_buddy_page(p))
238 return; 238 return;
239 } 239 }
@@ -1661,7 +1661,7 @@ static int __soft_offline_page(struct page *page, int flags)
1661 if (!is_free_buddy_page(page)) 1661 if (!is_free_buddy_page(page))
1662 lru_add_drain_all(); 1662 lru_add_drain_all();
1663 if (!is_free_buddy_page(page)) 1663 if (!is_free_buddy_page(page))
1664 drain_all_pages(NULL); 1664 drain_all_pages(page_zone(page));
1665 SetPageHWPoison(page); 1665 SetPageHWPoison(page);
1666 if (!is_free_buddy_page(page)) 1666 if (!is_free_buddy_page(page))
1667 pr_info("soft offline: %#lx: page leaked\n", 1667 pr_info("soft offline: %#lx: page leaked\n",
diff --git a/mm/memory_hotplug.c b/mm/memory_hotplug.c
index aa0c6e5a3065..9fab10795bea 100644
--- a/mm/memory_hotplug.c
+++ b/mm/memory_hotplug.c
@@ -1725,7 +1725,7 @@ repeat:
1725 if (drain) { 1725 if (drain) {
1726 lru_add_drain_all(); 1726 lru_add_drain_all();
1727 cond_resched(); 1727 cond_resched();
1728 drain_all_pages(NULL); 1728 drain_all_pages(zone);
1729 } 1729 }
1730 1730
1731 pfn = scan_movable_pages(start_pfn, end_pfn); 1731 pfn = scan_movable_pages(start_pfn, end_pfn);
@@ -1747,7 +1747,7 @@ repeat:
1747 lru_add_drain_all(); 1747 lru_add_drain_all();
1748 yield(); 1748 yield();
1749 /* drain pcp pages, this is synchronous. */ 1749 /* drain pcp pages, this is synchronous. */
1750 drain_all_pages(NULL); 1750 drain_all_pages(zone);
1751 /* 1751 /*
1752 * dissolve free hugepages in the memory block before doing offlining 1752 * dissolve free hugepages in the memory block before doing offlining
1753 * actually in order to make hugetlbfs's object counting consistent. 1753 * actually in order to make hugetlbfs's object counting consistent.