Pass last_nid from misplaced page to newly allocated migration target page.

Signed-off-by: Hillf Danton <dhi...@gmail.com>
---

--- a/mm/migrate.c      Tue Nov 27 20:16:48 2012
+++ b/mm/migrate.c      Tue Nov 27 20:19:12 2012
@@ -1457,6 +1457,9 @@ static struct page *alloc_misplaced_dst_
                                          __GFP_NOMEMALLOC | __GFP_NORETRY |
                                          __GFP_NOWARN) &
                                         ~GFP_IOFS, 0);
+       if (newpage)
+               page_xchg_last_nid(newpage, page_last_nid(page));
+
        return newpage;
 }

@@ -1627,6 +1630,8 @@ int migrate_misplaced_transhuge_page(str
                (GFP_TRANSHUGE | GFP_THISNODE) & ~__GFP_WAIT, HPAGE_PMD_ORDER);
        if (!new_page)
                goto out_dropref;
+
+       page_xchg_last_nid(new_page, page_last_nid(page));

        isolated = numamigrate_isolate_page(pgdat, page);
        if (!isolated) {
--
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Reply via email to