Skip to content

Commit c7073ba

Browse files
JoonsooKimtorvalds
authored andcommitted
mm/page_isolation: prefer the node of the source page
Patch series "clean-up the migration target allocation functions", v5. This patch (of 9): For locality, it's better to migrate the page to the same node rather than the node of the current caller's cpu. Signed-off-by: Joonsoo Kim <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Reviewed-by: Vlastimil Babka <[email protected]> Acked-by: Roman Gushchin <[email protected]> Acked-by: Michal Hocko <[email protected]> Cc: Christoph Hellwig <[email protected]> Cc: Mike Kravetz <[email protected]> Cc: Naoya Horiguchi <[email protected]> Link: http://lkml.kernel.org/r/[email protected] Link: http://lkml.kernel.org/r/[email protected] Signed-off-by: Linus Torvalds <[email protected]>
1 parent ce14489 commit c7073ba

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

mm/page_isolation.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -309,5 +309,7 @@ int test_pages_isolated(unsigned long start_pfn, unsigned long end_pfn,
309309

310310
struct page *alloc_migrate_target(struct page *page, unsigned long private)
311311
{
312-
return new_page_nodemask(page, numa_node_id(), &node_states[N_MEMORY]);
312+
int nid = page_to_nid(page);
313+
314+
return new_page_nodemask(page, nid, &node_states[N_MEMORY]);
313315
}

0 commit comments

Comments
 (0)