aboutsummaryrefslogtreecommitdiffstats
path: root/mm/page_isolation.c
diff options
context:
space:
mode:
authorKAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>2007-11-14 19:59:12 -0500
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2007-11-14 21:45:38 -0500
commitdbc0e4cefd003834440fe7ac5464616c5235cb94 (patch)
tree8c64dd88783239a360b937315b3109276b7f193a /mm/page_isolation.c
parent3ad33b2436b545cbe8b28e53f3710432cad457ab (diff)
memory hotremove: unset migrate type "ISOLATE" after removal
We should unset migrate type "ISOLATE" when we successfully removed memory. But current code has BUG and cannot works well. This patch also includes bugfix? to change get_pageblock_flags to get_pageblock_migratetype(). Thanks to Badari Pulavarty for finding this. Signed-off-by: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com> Acked-by: Badari Pulavarty <pbadari@us.ibm.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'mm/page_isolation.c')
-rw-r--r--mm/page_isolation.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/mm/page_isolation.c b/mm/page_isolation.c
index 8f92a29695cc..3444b58033c8 100644
--- a/mm/page_isolation.c
+++ b/mm/page_isolation.c
@@ -55,7 +55,7 @@ start_isolate_page_range(unsigned long start_pfn, unsigned long end_pfn)
55 return 0; 55 return 0;
56undo: 56undo:
57 for (pfn = start_pfn; 57 for (pfn = start_pfn;
58 pfn <= undo_pfn; 58 pfn < undo_pfn;
59 pfn += pageblock_nr_pages) 59 pfn += pageblock_nr_pages)
60 unset_migratetype_isolate(pfn_to_page(pfn)); 60 unset_migratetype_isolate(pfn_to_page(pfn));
61 61
@@ -76,7 +76,7 @@ undo_isolate_page_range(unsigned long start_pfn, unsigned long end_pfn)
76 pfn < end_pfn; 76 pfn < end_pfn;
77 pfn += pageblock_nr_pages) { 77 pfn += pageblock_nr_pages) {
78 page = __first_valid_page(pfn, pageblock_nr_pages); 78 page = __first_valid_page(pfn, pageblock_nr_pages);
79 if (!page || get_pageblock_flags(page) != MIGRATE_ISOLATE) 79 if (!page || get_pageblock_migratetype(page) != MIGRATE_ISOLATE)
80 continue; 80 continue;
81 unset_migratetype_isolate(page); 81 unset_migratetype_isolate(page);
82 } 82 }
@@ -126,7 +126,7 @@ int test_pages_isolated(unsigned long start_pfn, unsigned long end_pfn)
126 */ 126 */
127 for (pfn = start_pfn; pfn < end_pfn; pfn += pageblock_nr_pages) { 127 for (pfn = start_pfn; pfn < end_pfn; pfn += pageblock_nr_pages) {
128 page = __first_valid_page(pfn, pageblock_nr_pages); 128 page = __first_valid_page(pfn, pageblock_nr_pages);
129 if (page && get_pageblock_flags(page) != MIGRATE_ISOLATE) 129 if (page && get_pageblock_migratetype(page) != MIGRATE_ISOLATE)
130 break; 130 break;
131 } 131 }
132 if (pfn < end_pfn) 132 if (pfn < end_pfn)