aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorMel Gorman <mgorman@suse.de>2014-01-07 14:00:45 +0000
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2014-01-09 12:25:14 -0800
commitfd5df8002f7668ac04a53b1b6d75296ad191a136 (patch)
treeb5e1de83ba1d5e14e1f57ddeb79e5da3ec2d6bee /include
parent3d792d616ba408ab55a54c1bb75a9367d997acfa (diff)
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 'include')
-rw-r--r--include/linux/migrate.h10
1 files changed, 9 insertions, 1 deletions
diff --git a/include/linux/migrate.h b/include/linux/migrate.h
index 8d3c57fdf22..804651c6229 100644
--- a/include/linux/migrate.h
+++ b/include/linux/migrate.h
@@ -90,10 +90,18 @@ static inline int migrate_huge_page_move_mapping(struct address_space *mapping,
#endif /* CONFIG_MIGRATION */
#ifdef CONFIG_NUMA_BALANCING
-extern int migrate_misplaced_page(struct page *page, int node);
+extern bool pmd_trans_migrating(pmd_t pmd);
+extern void wait_migrate_huge_page(struct anon_vma *anon_vma, pmd_t *pmd);
extern int migrate_misplaced_page(struct page *page, int node);
extern bool migrate_ratelimited(int node);
#else
+static inline bool pmd_trans_migrating(pmd_t pmd)
+{
+ return false;
+}
+static inline void wait_migrate_huge_page(struct anon_vma *anon_vma, pmd_t *pmd)
+{
+}
static inline int migrate_misplaced_page(struct page *page, int node)
{
return -EAGAIN; /* can't migrate now */