aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorMel Gorman <mgorman@suse.de>2013-12-18 20:08:42 -0500
committerLinus Torvalds <torvalds@linux-foundation.org>2013-12-18 22:04:51 -0500
commitde466bd628e8d663fdf3f791bc8db318ee85c714 (patch)
treea7f9cc6ab09cbdbce981b974c8ec238f6c3e1524 /include
parent1667918b6483b12a6496bf54151b827b8235d7b1 (diff)
mm: numa: avoid unnecessary disruption of NUMA hinting during migration
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> Cc: <stable@vger.kernel.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'include')
-rw-r--r--include/linux/migrate.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/include/linux/migrate.h b/include/linux/migrate.h
index f5096b58b20d..b7717d74da7f 100644
--- a/include/linux/migrate.h
+++ b/include/linux/migrate.h
@@ -90,10 +90,19 @@ static inline int migrate_huge_page_move_mapping(struct address_space *mapping,
90#endif /* CONFIG_MIGRATION */ 90#endif /* CONFIG_MIGRATION */
91 91
92#ifdef CONFIG_NUMA_BALANCING 92#ifdef CONFIG_NUMA_BALANCING
93extern bool pmd_trans_migrating(pmd_t pmd);
94extern void wait_migrate_huge_page(struct anon_vma *anon_vma, pmd_t *pmd);
93extern int migrate_misplaced_page(struct page *page, 95extern int migrate_misplaced_page(struct page *page,
94 struct vm_area_struct *vma, int node); 96 struct vm_area_struct *vma, int node);
95extern bool migrate_ratelimited(int node); 97extern bool migrate_ratelimited(int node);
96#else 98#else
99static inline bool pmd_trans_migrating(pmd_t pmd)
100{
101 return false;
102}
103static inline void wait_migrate_huge_page(struct anon_vma *anon_vma, pmd_t *pmd)
104{
105}
97static inline int migrate_misplaced_page(struct page *page, 106static inline int migrate_misplaced_page(struct page *page,
98 struct vm_area_struct *vma, int node) 107 struct vm_area_struct *vma, int node)
99{ 108{