aboutsummaryrefslogtreecommitdiffstats
path: root/mm/mempolicy.c
diff options
context:
space:
mode:
authorMel Gorman <mgorman@suse.de>2012-10-19 09:07:31 -0400
committerMel Gorman <mgorman@suse.de>2012-12-11 09:28:35 -0500
commit7b2a2d4a18fffac3c4872021529b0657896db788 (patch)
treea0f05be191f12711a774368f6feb15bcd2eebf1a /mm/mempolicy.c
parent5647bc293ab15f66a7b1cda850c5e9d162a6c7c2 (diff)
mm: migrate: Add a tracepoint for migrate_pages
The pgmigrate_success and pgmigrate_fail vmstat counters tells the user about migration activity but not the type or the reason. This patch adds a tracepoint to identify the type of page migration and why the page is being migrated. Signed-off-by: Mel Gorman <mgorman@suse.de> Reviewed-by: Rik van Riel <riel@redhat.com>
Diffstat (limited to 'mm/mempolicy.c')
-rw-r--r--mm/mempolicy.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/mm/mempolicy.c b/mm/mempolicy.c
index d04a8a54c294..66e90ecc2350 100644
--- a/mm/mempolicy.c
+++ b/mm/mempolicy.c
@@ -961,7 +961,8 @@ static int migrate_to_node(struct mm_struct *mm, int source, int dest,
961 961
962 if (!list_empty(&pagelist)) { 962 if (!list_empty(&pagelist)) {
963 err = migrate_pages(&pagelist, new_node_page, dest, 963 err = migrate_pages(&pagelist, new_node_page, dest,
964 false, MIGRATE_SYNC); 964 false, MIGRATE_SYNC,
965 MR_SYSCALL);
965 if (err) 966 if (err)
966 putback_lru_pages(&pagelist); 967 putback_lru_pages(&pagelist);
967 } 968 }
@@ -1202,7 +1203,8 @@ static long do_mbind(unsigned long start, unsigned long len,
1202 if (!list_empty(&pagelist)) { 1203 if (!list_empty(&pagelist)) {
1203 nr_failed = migrate_pages(&pagelist, new_vma_page, 1204 nr_failed = migrate_pages(&pagelist, new_vma_page,
1204 (unsigned long)vma, 1205 (unsigned long)vma,
1205 false, MIGRATE_SYNC); 1206 false, MIGRATE_SYNC,
1207 MR_MEMPOLICY_MBIND);
1206 if (nr_failed) 1208 if (nr_failed)
1207 putback_lru_pages(&pagelist); 1209 putback_lru_pages(&pagelist);
1208 } 1210 }