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>
This commit is contained in:
Mel Gorman
2012-10-19 14:07:31 +01:00
bovenliggende 5647bc293a
commit 7b2a2d4a18
8 gewijzigde bestanden met toevoegingen van 82 en 10 verwijderingen

Bestand weergeven

@@ -961,7 +961,8 @@ static int migrate_to_node(struct mm_struct *mm, int source, int dest,
if (!list_empty(&pagelist)) {
err = migrate_pages(&pagelist, new_node_page, dest,
false, MIGRATE_SYNC);
false, MIGRATE_SYNC,
MR_SYSCALL);
if (err)
putback_lru_pages(&pagelist);
}
@@ -1202,7 +1203,8 @@ static long do_mbind(unsigned long start, unsigned long len,
if (!list_empty(&pagelist)) {
nr_failed = migrate_pages(&pagelist, new_vma_page,
(unsigned long)vma,
false, MIGRATE_SYNC);
false, MIGRATE_SYNC,
MR_MEMPOLICY_MBIND);
if (nr_failed)
putback_lru_pages(&pagelist);
}