Skip to content

Commit

Permalink
mm: numa: avoid unnecessary work on the failure path
Browse files Browse the repository at this point in the history
If a PMD changes during a THP migration then migration aborts but the
failure path is doing more work than is necessary.

Signed-off-by: Mel Gorman <[email protected]>
Reviewed-by: Rik van Riel <[email protected]>
Cc: Alex Thorlton <[email protected]>
Cc: <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
  • Loading branch information
Mel Gorman authored and torvalds committed Dec 19, 2013
1 parent c3a489c commit eb4489f
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion mm/migrate.c
Original file line number Diff line number Diff line change
Expand Up @@ -1780,7 +1780,8 @@ int migrate_misplaced_transhuge_page(struct mm_struct *mm,
putback_lru_page(page);
mod_zone_page_state(page_zone(page),
NR_ISOLATED_ANON + page_lru, -HPAGE_PMD_NR);
goto out_fail;

goto out_unlock;
}

/*
Expand Down Expand Up @@ -1854,6 +1855,7 @@ int migrate_misplaced_transhuge_page(struct mm_struct *mm,
}
spin_unlock(ptl);

out_unlock:
unlock_page(page);
put_page(page);
return 0;
Expand Down

0 comments on commit eb4489f

Please sign in to comment.