diff options
author | Michal Nazarewicz <mina86@mina86.com> | 2012-04-03 09:06:15 -0400 |
---|---|---|
committer | Marek Szyprowski <m.szyprowski@samsung.com> | 2012-05-21 09:09:33 -0400 |
commit | 0815f3d81d76dfbf2abcfd93a85ff0a6008fe4c0 (patch) | |
tree | 750e239c7c522a206bb04bd8bfcd89c3bf3be30d /mm/memory_hotplug.c | |
parent | 47118af076f64844b4f423bc2f545b2da9dab50d (diff) |
mm: page_isolation: MIGRATE_CMA isolation functions added
This commit changes various functions that change pages and
pageblocks migrate type between MIGRATE_ISOLATE and
MIGRATE_MOVABLE in such a way as to allow to work with
MIGRATE_CMA migrate type.
Signed-off-by: Michal Nazarewicz <mina86@mina86.com>
Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Reviewed-by: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
Tested-by: Rob Clark <rob.clark@linaro.org>
Tested-by: Ohad Ben-Cohen <ohad@wizery.com>
Tested-by: Benjamin Gaignard <benjamin.gaignard@linaro.org>
Tested-by: Robert Nelson <robertcnelson@gmail.com>
Tested-by: Barry Song <Baohua.Song@csr.com>
Diffstat (limited to 'mm/memory_hotplug.c')
-rw-r--r-- | mm/memory_hotplug.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/mm/memory_hotplug.c b/mm/memory_hotplug.c index 6629fafd6ce4..fc898cb4fe8f 100644 --- a/mm/memory_hotplug.c +++ b/mm/memory_hotplug.c | |||
@@ -891,7 +891,7 @@ static int __ref offline_pages(unsigned long start_pfn, | |||
891 | nr_pages = end_pfn - start_pfn; | 891 | nr_pages = end_pfn - start_pfn; |
892 | 892 | ||
893 | /* set above range as isolated */ | 893 | /* set above range as isolated */ |
894 | ret = start_isolate_page_range(start_pfn, end_pfn); | 894 | ret = start_isolate_page_range(start_pfn, end_pfn, MIGRATE_MOVABLE); |
895 | if (ret) | 895 | if (ret) |
896 | goto out; | 896 | goto out; |
897 | 897 | ||
@@ -956,7 +956,7 @@ repeat: | |||
956 | We cannot do rollback at this point. */ | 956 | We cannot do rollback at this point. */ |
957 | offline_isolated_pages(start_pfn, end_pfn); | 957 | offline_isolated_pages(start_pfn, end_pfn); |
958 | /* reset pagetype flags and makes migrate type to be MOVABLE */ | 958 | /* reset pagetype flags and makes migrate type to be MOVABLE */ |
959 | undo_isolate_page_range(start_pfn, end_pfn); | 959 | undo_isolate_page_range(start_pfn, end_pfn, MIGRATE_MOVABLE); |
960 | /* removal success */ | 960 | /* removal success */ |
961 | zone->present_pages -= offlined_pages; | 961 | zone->present_pages -= offlined_pages; |
962 | zone->zone_pgdat->node_present_pages -= offlined_pages; | 962 | zone->zone_pgdat->node_present_pages -= offlined_pages; |
@@ -981,7 +981,7 @@ failed_removal: | |||
981 | start_pfn, end_pfn); | 981 | start_pfn, end_pfn); |
982 | memory_notify(MEM_CANCEL_OFFLINE, &arg); | 982 | memory_notify(MEM_CANCEL_OFFLINE, &arg); |
983 | /* pushback to free area */ | 983 | /* pushback to free area */ |
984 | undo_isolate_page_range(start_pfn, end_pfn); | 984 | undo_isolate_page_range(start_pfn, end_pfn, MIGRATE_MOVABLE); |
985 | 985 | ||
986 | out: | 986 | out: |
987 | unlock_memory_hotplug(); | 987 | unlock_memory_hotplug(); |