diff options
author | Mel Gorman <mgorman@suse.de> | 2012-11-27 05:31:44 -0500 |
---|---|---|
committer | Mel Gorman <mgorman@suse.de> | 2012-12-11 09:42:58 -0500 |
commit | 7548341b28956ccd35a63ab12f01d8541041aa70 (patch) | |
tree | efa2a33587ac785c6462fee04146c52258740e66 /mm/migrate.c | |
parent | 220018d388b8ab1fca1c5f0c6474bab47ad2c9c0 (diff) |
mm: numa: Account for failed allocations and isolations as migration failures
Subject says it all. Allocation failures and a failure to isolate should
be accounted as a migration failure. This is partially another
difference between base page and transhuge page migration. A base page
migration makes multiple attempts for these conditions before it would
be accounted for as a failure.
Signed-off-by: Mel Gorman <mgorman@suse.de>
Diffstat (limited to 'mm/migrate.c')
-rw-r--r-- | mm/migrate.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/mm/migrate.c b/mm/migrate.c index 9341a501d168..26537c4f3094 100644 --- a/mm/migrate.c +++ b/mm/migrate.c | |||
@@ -1635,12 +1635,15 @@ int migrate_misplaced_transhuge_page(struct mm_struct *mm, | |||
1635 | 1635 | ||
1636 | new_page = alloc_pages_node(node, | 1636 | new_page = alloc_pages_node(node, |
1637 | (GFP_TRANSHUGE | GFP_THISNODE) & ~__GFP_WAIT, HPAGE_PMD_ORDER); | 1637 | (GFP_TRANSHUGE | GFP_THISNODE) & ~__GFP_WAIT, HPAGE_PMD_ORDER); |
1638 | if (!new_page) | 1638 | if (!new_page) { |
1639 | count_vm_events(PGMIGRATE_FAIL, HPAGE_PMD_NR); | ||
1639 | goto out_dropref; | 1640 | goto out_dropref; |
1641 | } | ||
1640 | page_xchg_last_nid(new_page, page_last_nid(page)); | 1642 | page_xchg_last_nid(new_page, page_last_nid(page)); |
1641 | 1643 | ||
1642 | isolated = numamigrate_isolate_page(pgdat, page); | 1644 | isolated = numamigrate_isolate_page(pgdat, page); |
1643 | if (!isolated) { | 1645 | if (!isolated) { |
1646 | count_vm_events(PGMIGRATE_FAIL, HPAGE_PMD_NR); | ||
1644 | put_page(new_page); | 1647 | put_page(new_page); |
1645 | goto out_keep_locked; | 1648 | goto out_keep_locked; |
1646 | } | 1649 | } |