summaryrefslogtreecommitdiff
path: root/mm/migrate.c
diff options
context:
space:
mode:
authorMel Gorman <mgorman@suse.de>2014-01-07 14:00:45 (GMT)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2014-01-09 20:25:14 (GMT)
commitfd5df8002f7668ac04a53b1b6d75296ad191a136 (patch)
treeb5e1de83ba1d5e14e1f57ddeb79e5da3ec2d6bee /mm/migrate.c
parent3d792d616ba408ab55a54c1bb75a9367d997acfa (diff)
downloadlinux-fsl-qoriq-fd5df8002f7668ac04a53b1b6d75296ad191a136.tar.xz
mm: numa: avoid unnecessary disruption of NUMA hinting during migration
commit de466bd628e8d663fdf3f791bc8db318ee85c714 upstream. do_huge_pmd_numa_page() handles the case where there is parallel THP migration. However, by the time it is checked the NUMA hinting information has already been disrupted. This patch adds an earlier check with some helpers. 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/migrate.c')
-rw-r--r--mm/migrate.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/mm/migrate.c b/mm/migrate.c
index e33f0d1..6609413 100644
--- a/mm/migrate.c
+++ b/mm/migrate.c
@@ -1597,6 +1597,18 @@ int numamigrate_isolate_page(pg_data_t *pgdat, struct page *page)
return 1;
}
+bool pmd_trans_migrating(pmd_t pmd)
+{
+ struct page *page = pmd_page(pmd);
+ return PageLocked(page);
+}
+
+void wait_migrate_huge_page(struct anon_vma *anon_vma, pmd_t *pmd)
+{
+ struct page *page = pmd_page(*pmd);
+ wait_on_page_locked(page);
+}
+
/*
* Attempt to migrate a misplaced page to the specified destination
* node. Caller is expected to have an elevated reference count on