aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/migrate.h
diff options
context:
space:
mode:
authorMel Gorman <mgorman@suse.de>2012-11-19 05:59:15 -0500
committerMel Gorman <mgorman@suse.de>2012-12-11 09:42:51 -0500
commite14808b49f55e0e1135da5e4a154a540dd9f3662 (patch)
treed66708455dcc1b6e2e15937d732ab12c121e623a /include/linux/migrate.h
parenta8f6077213d285ca08dbf6d4a67470787388138b (diff)
mm: numa: Rate limit setting of pte_numa if node is saturated
If there are a large number of NUMA hinting faults and all of them are resulting in migrations it may indicate that memory is just bouncing uselessly around. NUMA balancing cost is likely exceeding any benefit from locality. Rate limit the PTE updates if the node is migration rate-limited. As noted in the comments, this distorts the NUMA faulting statistics. Signed-off-by: Mel Gorman <mgorman@suse.de>
Diffstat (limited to 'include/linux/migrate.h')
-rw-r--r--include/linux/migrate.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/include/linux/migrate.h b/include/linux/migrate.h
index f0d0313eea6f..91556889adac 100644
--- a/include/linux/migrate.h
+++ b/include/linux/migrate.h
@@ -77,11 +77,17 @@ static inline int migrate_huge_page_move_mapping(struct address_space *mapping,
77 77
78#ifdef CONFIG_NUMA_BALANCING 78#ifdef CONFIG_NUMA_BALANCING
79extern int migrate_misplaced_page(struct page *page, int node); 79extern int migrate_misplaced_page(struct page *page, int node);
80extern int migrate_misplaced_page(struct page *page, int node);
81extern bool migrate_ratelimited(int node);
80#else 82#else
81static inline int migrate_misplaced_page(struct page *page, int node) 83static inline int migrate_misplaced_page(struct page *page, int node)
82{ 84{
83 return -EAGAIN; /* can't migrate now */ 85 return -EAGAIN; /* can't migrate now */
84} 86}
87static inline bool migrate_ratelimited(int node)
88{
89 return false;
90}
85#endif /* CONFIG_NUMA_BALANCING */ 91#endif /* CONFIG_NUMA_BALANCING */
86 92
87#endif /* _LINUX_MIGRATE_H */ 93#endif /* _LINUX_MIGRATE_H */