forked from Minki/linux
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 <iamjoonsoo.kim@lge.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Reviewed-by: Vlastimil Babka <vbabka@suse.cz> Acked-by: Roman Gushchin <guro@fb.com> Acked-by: Michal Hocko <mhocko@suse.com> Cc: Christoph Hellwig <hch@infradead.org> Cc: Mike Kravetz <mike.kravetz@oracle.com> Cc: Naoya Horiguchi <n-horiguchi@ah.jp.nec.com> Link: http://lkml.kernel.org/r/1594622517-20681-1-git-send-email-iamjoonsoo.kim@lge.com Link: http://lkml.kernel.org/r/1594622517-20681-2-git-send-email-iamjoonsoo.kim@lge.com Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
This commit is contained in:
parent
ce14489c8e
commit
c7073bab57
@ -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]);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user