summaryrefslogtreecommitdiffstats
path: root/mm/page_isolation.c
diff options
context:
space:
mode:
Diffstat (limited to 'mm/page_isolation.c')
-rw-r--r--mm/page_isolation.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/mm/page_isolation.c b/mm/page_isolation.c
index 43e085608846..ce323e56b34d 100644
--- a/mm/page_isolation.c
+++ b/mm/page_isolation.c
@@ -15,8 +15,7 @@
15#define CREATE_TRACE_POINTS 15#define CREATE_TRACE_POINTS
16#include <trace/events/page_isolation.h> 16#include <trace/events/page_isolation.h>
17 17
18static int set_migratetype_isolate(struct page *page, int migratetype, 18static int set_migratetype_isolate(struct page *page, int migratetype, int isol_flags)
19 bool skip_hwpoisoned_pages)
20{ 19{
21 struct zone *zone; 20 struct zone *zone;
22 unsigned long flags, pfn; 21 unsigned long flags, pfn;
@@ -60,8 +59,7 @@ static int set_migratetype_isolate(struct page *page, int migratetype,
60 * FIXME: Now, memory hotplug doesn't call shrink_slab() by itself. 59 * FIXME: Now, memory hotplug doesn't call shrink_slab() by itself.
61 * We just check MOVABLE pages. 60 * We just check MOVABLE pages.
62 */ 61 */
63 if (!has_unmovable_pages(zone, page, arg.pages_found, migratetype, 62 if (!has_unmovable_pages(zone, page, arg.pages_found, migratetype, flags))
64 skip_hwpoisoned_pages))
65 ret = 0; 63 ret = 0;
66 64
67 /* 65 /*
@@ -185,7 +183,7 @@ __first_valid_page(unsigned long pfn, unsigned long nr_pages)
185 * prevents two threads from simultaneously working on overlapping ranges. 183 * prevents two threads from simultaneously working on overlapping ranges.
186 */ 184 */
187int start_isolate_page_range(unsigned long start_pfn, unsigned long end_pfn, 185int start_isolate_page_range(unsigned long start_pfn, unsigned long end_pfn,
188 unsigned migratetype, bool skip_hwpoisoned_pages) 186 unsigned migratetype, int flags)
189{ 187{
190 unsigned long pfn; 188 unsigned long pfn;
191 unsigned long undo_pfn; 189 unsigned long undo_pfn;
@@ -199,7 +197,7 @@ int start_isolate_page_range(unsigned long start_pfn, unsigned long end_pfn,
199 pfn += pageblock_nr_pages) { 197 pfn += pageblock_nr_pages) {
200 page = __first_valid_page(pfn, pageblock_nr_pages); 198 page = __first_valid_page(pfn, pageblock_nr_pages);
201 if (page && 199 if (page &&
202 set_migratetype_isolate(page, migratetype, skip_hwpoisoned_pages)) { 200 set_migratetype_isolate(page, migratetype, flags)) {
203 undo_pfn = pfn; 201 undo_pfn = pfn;
204 goto undo; 202 goto undo;
205 } 203 }