mm, migrate: remove reason argument from new_page_t
No allocation callback is using this argument anymore. new_page_node used to use this parameter to convey node_id resp. migration error up to move_pages code (do_move_page_to_node_array). The error status never made it into the final status field and we have a better way to communicate node id to the status field now. All other allocation callbacks simply ignored the argument so we can drop it finally. [mhocko@suse.com: fix migration callback] Link: http://lkml.kernel.org/r/20180105085259.GH2801@dhcp22.suse.cz [akpm@linux-foundation.org: fix alloc_misplaced_dst_page()] [mhocko@kernel.org: fix build] Link: http://lkml.kernel.org/r/20180103091134.GB11319@dhcp22.suse.cz Link: http://lkml.kernel.org/r/20180103082555.14592-3-mhocko@kernel.org Signed-off-by: Michal Hocko <mhocko@suse.com> Reviewed-by: Zi Yan <zi.yan@cs.rutgers.edu> Cc: Andrea Reale <ar@linux.vnet.ibm.com> Cc: Anshuman Khandual <khandual@linux.vnet.ibm.com> Cc: Kirill A. Shutemov <kirill.shutemov@linux.intel.com> Cc: Mike Kravetz <mike.kravetz@oracle.com> Cc: Naoya Horiguchi <n-horiguchi@ah.jp.nec.com> Cc: Vlastimil Babka <vbabka@suse.cz> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
This commit is contained in:

committed by
Linus Torvalds

parent
a49bd4d716
commit
666feb21a0
21
mm/migrate.c
21
mm/migrate.c
@@ -1137,10 +1137,9 @@ static ICE_noinline int unmap_and_move(new_page_t get_new_page,
|
||||
enum migrate_reason reason)
|
||||
{
|
||||
int rc = MIGRATEPAGE_SUCCESS;
|
||||
int *result = NULL;
|
||||
struct page *newpage;
|
||||
|
||||
newpage = get_new_page(page, private, &result);
|
||||
newpage = get_new_page(page, private);
|
||||
if (!newpage)
|
||||
return -ENOMEM;
|
||||
|
||||
@@ -1231,12 +1230,6 @@ put_new:
|
||||
put_page(newpage);
|
||||
}
|
||||
|
||||
if (result) {
|
||||
if (rc)
|
||||
*result = rc;
|
||||
else
|
||||
*result = page_to_nid(newpage);
|
||||
}
|
||||
return rc;
|
||||
}
|
||||
|
||||
@@ -1264,7 +1257,6 @@ static int unmap_and_move_huge_page(new_page_t get_new_page,
|
||||
enum migrate_mode mode, int reason)
|
||||
{
|
||||
int rc = -EAGAIN;
|
||||
int *result = NULL;
|
||||
int page_was_mapped = 0;
|
||||
struct page *new_hpage;
|
||||
struct anon_vma *anon_vma = NULL;
|
||||
@@ -1281,7 +1273,7 @@ static int unmap_and_move_huge_page(new_page_t get_new_page,
|
||||
return -ENOSYS;
|
||||
}
|
||||
|
||||
new_hpage = get_new_page(hpage, private, &result);
|
||||
new_hpage = get_new_page(hpage, private);
|
||||
if (!new_hpage)
|
||||
return -ENOMEM;
|
||||
|
||||
@@ -1345,12 +1337,6 @@ out:
|
||||
else
|
||||
putback_active_hugepage(new_hpage);
|
||||
|
||||
if (result) {
|
||||
if (rc)
|
||||
*result = rc;
|
||||
else
|
||||
*result = page_to_nid(new_hpage);
|
||||
}
|
||||
return rc;
|
||||
}
|
||||
|
||||
@@ -1828,8 +1814,7 @@ static bool migrate_balanced_pgdat(struct pglist_data *pgdat,
|
||||
}
|
||||
|
||||
static struct page *alloc_misplaced_dst_page(struct page *page,
|
||||
unsigned long data,
|
||||
int **result)
|
||||
unsigned long data)
|
||||
{
|
||||
int nid = (int) data;
|
||||
struct page *newpage;
|
||||
|
Reference in New Issue
Block a user