diff options
author | Joonsoo Kim <iamjoonsoo.kim@lge.com> | 2020-08-12 04:37:28 +0300 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2020-08-12 20:58:02 +0300 |
commit | a097631160c3b71a12db224ece7d72208c9b6846 (patch) | |
tree | c66c39bc8725aacf3127cb92f4326d951e863394 /mm/migrate.c | |
parent | 19fc7bed252c16ace29491e4cfa2bafb264eb505 (diff) | |
download | linux-a097631160c3b71a12db224ece7d72208c9b6846.tar.xz |
mm/mempolicy: use a standard migration target allocation callback
There is a well-defined migration target allocation callback. Use it.
Signed-off-by: Joonsoo Kim <iamjoonsoo.kim@lge.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Acked-by: Michal Hocko <mhocko@suse.com>
Acked-by: Vlastimil Babka <vbabka@suse.cz>
Cc: Christoph Hellwig <hch@infradead.org>
Cc: Mike Kravetz <mike.kravetz@oracle.com>
Cc: Naoya Horiguchi <n-horiguchi@ah.jp.nec.com>
Cc: Roman Gushchin <guro@fb.com>
Link: http://lkml.kernel.org/r/1594622517-20681-7-git-send-email-iamjoonsoo.kim@lge.com
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'mm/migrate.c')
-rw-r--r-- | mm/migrate.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/mm/migrate.c b/mm/migrate.c index 48b1f149494b..5053439be6ab 100644 --- a/mm/migrate.c +++ b/mm/migrate.c @@ -1598,9 +1598,13 @@ static int do_move_pages_to_node(struct mm_struct *mm, struct list_head *pagelist, int node) { int err; + struct migration_target_control mtc = { + .nid = node, + .gfp_mask = GFP_HIGHUSER_MOVABLE | __GFP_THISNODE, + }; - err = migrate_pages(pagelist, alloc_new_node_page, NULL, node, - MIGRATE_SYNC, MR_SYSCALL); + err = migrate_pages(pagelist, alloc_migration_target, NULL, + (unsigned long)&mtc, MIGRATE_SYNC, MR_SYSCALL); if (err) putback_movable_pages(pagelist); return err; |