path: root/mm/migrate.c
diff options
authorLiam Mark <>2021-05-04 18:37:25 -0700
committerLinus Torvalds <>2021-05-05 11:27:24 -0700
commit7bc1aec5e28765ad18742824b3b972471807a632 (patch)
tree670c177be7f22d8a39849161863f0d7fe8263f52 /mm/migrate.c
parent63f83b31f4f36d933e13bd8b9a25d6d9a0cf89dd (diff)
mm: cma: add trace events for CMA alloc perf testing
Add cma and migrate trace events to enable CMA allocation performance to be measured via ftrace. [ add the CMA instance name to the cma_alloc_start trace event] Link: Link: Signed-off-by: Liam Mark <> Signed-off-by: Georgi Djakov <> Acked-by: Minchan Kim <> Signed-off-by: Andrew Morton <> Signed-off-by: Linus Torvalds <>
Diffstat (limited to 'mm/migrate.c')
1 files changed, 2 insertions, 0 deletions
diff --git a/mm/migrate.c b/mm/migrate.c
index 30c65c2be30b..6b37d00890ca 100644
--- a/mm/migrate.c
+++ b/mm/migrate.c
@@ -1418,6 +1418,8 @@ int migrate_pages(struct list_head *from, new_page_t get_new_page,
int rc, nr_subpages;
+ trace_mm_migrate_pages_start(mode, reason);
if (!swapwrite)
current->flags |= PF_SWAPWRITE;