diff options
author | Mel Gorman <mgorman@suse.de> | 2013-12-18 20:08:39 -0500 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2014-01-09 15:24:23 -0500 |
commit | a29ccdd1b5a61fad7d4883b3ef63da3a313f1e44 (patch) | |
tree | 35589e2f1f251451b6b3b11765bf3738d42defd6 /mm | |
parent | 4455c567b8a231d6aa8bf077facfa559d2605357 (diff) |
mm: numa: avoid unnecessary work on the failure path
commit eb4489f69f224356193364dc2762aa009738ca7f upstream.
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 <mgorman@suse.de>
Reviewed-by: Rik van Riel <riel@redhat.com>
Cc: Alex Thorlton <athorlton@sgi.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'mm')
-rw-r--r-- | mm/migrate.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/mm/migrate.c b/mm/migrate.c index bf436c15f055..a88c12f2235d 100644 --- a/mm/migrate.c +++ b/mm/migrate.c | |||
@@ -1715,7 +1715,8 @@ int migrate_misplaced_transhuge_page(struct mm_struct *mm, | |||
1715 | putback_lru_page(page); | 1715 | putback_lru_page(page); |
1716 | mod_zone_page_state(page_zone(page), | 1716 | mod_zone_page_state(page_zone(page), |
1717 | NR_ISOLATED_ANON + page_lru, -HPAGE_PMD_NR); | 1717 | NR_ISOLATED_ANON + page_lru, -HPAGE_PMD_NR); |
1718 | goto out_fail; | 1718 | |
1719 | goto out_unlock; | ||
1719 | } | 1720 | } |
1720 | 1721 | ||
1721 | /* | 1722 | /* |
@@ -1765,6 +1766,7 @@ out_dropref: | |||
1765 | set_pmd_at(mm, haddr, pmd, entry); | 1766 | set_pmd_at(mm, haddr, pmd, entry); |
1766 | update_mmu_cache_pmd(vma, address, &entry); | 1767 | update_mmu_cache_pmd(vma, address, &entry); |
1767 | 1768 | ||
1769 | out_unlock: | ||
1768 | unlock_page(page); | 1770 | unlock_page(page); |
1769 | put_page(page); | 1771 | put_page(page); |
1770 | return 0; | 1772 | return 0; |