aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorJoonsoo Kim <[email protected]>2020-08-11 18:37:11 -0700
committerLinus Torvalds <[email protected]>2020-08-12 10:58:02 -0700
commitc7073bab5772e0e2ab2c766a05f68174974b1ab5 (patch)
treea48a683d23fd3a1cc758cb6285dbf9f00db787fb
parentipc/shm.c: remove the superfluous break (diff)
downloadwireguard-linux-c7073bab5772e0e2ab2c766a05f68174974b1ab5.tar.xz
wireguard-linux-c7073bab5772e0e2ab2c766a05f68174974b1ab5.zip
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]>
-rw-r--r--mm/page_isolation.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/mm/page_isolation.c b/mm/page_isolation.c
index f6d07c5f0d34..aec26d972b9f 100644
--- a/mm/page_isolation.c
+++ b/mm/page_isolation.c
@@ -309,5 +309,7 @@ int test_pages_isolated(unsigned long start_pfn, unsigned long end_pfn,
struct page *alloc_migrate_target(struct page *page, unsigned long private)
{
- return new_page_nodemask(page, numa_node_id(), &node_states[N_MEMORY]);
+ int nid = page_to_nid(page);
+
+ return new_page_nodemask(page, nid, &node_states[N_MEMORY]);
}
OSZAR »