Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=dbc0e4cefd003834440fe7ac5464616c5235cb94
Commit:     dbc0e4cefd003834440fe7ac5464616c5235cb94
Parent:     3ad33b2436b545cbe8b28e53f3710432cad457ab
Author:     KAMEZAWA Hiroyuki <[EMAIL PROTECTED]>
AuthorDate: Wed Nov 14 16:59:12 2007 -0800
Committer:  Linus Torvalds <[EMAIL PROTECTED]>
CommitDate: Wed Nov 14 18:45:38 2007 -0800

    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 <[EMAIL PROTECTED]>
    Acked-by: Badari Pulavarty <[EMAIL PROTECTED]>
    Signed-off-by: Andrew Morton <[EMAIL PROTECTED]>
    Signed-off-by: Linus Torvalds <[EMAIL PROTECTED]>
---
 mm/memory_hotplug.c |    4 ++--
 mm/page_isolation.c |    6 +++---
 2 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/mm/memory_hotplug.c b/mm/memory_hotplug.c
index 3a47871..987abe6 100644
--- a/mm/memory_hotplug.c
+++ b/mm/memory_hotplug.c
@@ -574,8 +574,8 @@ repeat:
        /* Ok, all of our target is islaoted.
           We cannot do rollback at this point. */
        offline_isolated_pages(start_pfn, end_pfn);
-       /* reset pagetype flags */
-       start_isolate_page_range(start_pfn, end_pfn);
+       /* reset pagetype flags and makes migrate type to be MOVABLE */
+       undo_isolate_page_range(start_pfn, end_pfn);
        /* removal success */
        zone->present_pages -= offlined_pages;
        zone->zone_pgdat->node_present_pages -= offlined_pages;
diff --git a/mm/page_isolation.c b/mm/page_isolation.c
index 8f92a29..3444b58 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)
        return 0;
 undo:
        for (pfn = start_pfn;
-            pfn <= undo_pfn;
+            pfn < undo_pfn;
             pfn += pageblock_nr_pages)
                unset_migratetype_isolate(pfn_to_page(pfn));
 
@@ -76,7 +76,7 @@ undo_isolate_page_range(unsigned long start_pfn, unsigned 
long end_pfn)
             pfn < end_pfn;
             pfn += pageblock_nr_pages) {
                page = __first_valid_page(pfn, pageblock_nr_pages);
-               if (!page || get_pageblock_flags(page) != MIGRATE_ISOLATE)
+               if (!page || get_pageblock_migratetype(page) != MIGRATE_ISOLATE)
                        continue;
                unset_migratetype_isolate(page);
        }
@@ -126,7 +126,7 @@ int test_pages_isolated(unsigned long start_pfn, unsigned 
long end_pfn)
         */
        for (pfn = start_pfn; pfn < end_pfn; pfn += pageblock_nr_pages) {
                page = __first_valid_page(pfn, pageblock_nr_pages);
-               if (page && get_pageblock_flags(page) != MIGRATE_ISOLATE)
+               if (page && get_pageblock_migratetype(page) != MIGRATE_ISOLATE)
                        break;
        }
        if (pfn < end_pfn)
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to