[PATCH 2/3] balancenuma: set last_nid on newly allocated page

From: Hillf Danton
Date: Tue Nov 27 2012 - 08:15:33 EST


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

Signed-off-by: Hillf Danton <dhillf@xxxxxxxxx>
---

--- 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 majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/