Record in the migrate_pages tracepoint that the migration is for
AutoNUMA.
Signed-off-by: Mel Gorman <mgorman@suse.de>
---
include/linux/migrate.h | 1 +
include/trace/events/migrate.h | 1 +
mm/autonuma.c | 3 ++-
3 files changed, 4 insertions(+), 1 deletions(-)
diff --git a/include/linux/migrate.h b/include/linux/migrate.h
index 9d1c159..ba17e56 100644
--- a/include/linux/migrate.h
+++ b/include/linux/migrate.h
@@ -13,6 +13,7 @@ enum migrate_reason {
MR_MEMORY_HOTPLUG,
MR_SYSCALL, /* also applies to cpusets */
MR_MEMPOLICY_MBIND,
+ MR_AUTONUMA,
MR_CMA
};
diff --git a/include/trace/events/migrate.h b/include/trace/events/migrate.h
index ec2a6cc..2eaaf90 100644
--- a/include/trace/events/migrate.h
+++ b/include/trace/events/migrate.h
@@ -15,6 +15,7 @@
{MR_MEMORY_HOTPLUG, "memory_hotplug"}, \
{MR_SYSCALL, "syscall_or_cpuset"}, \
{MR_MEMPOLICY_MBIND, "mempolicy_mbind"}, \
+ {MR_AUTONUMA, "autonuma"}, \
{MR_CMA, "cma"}
TRACE_EVENT(mm_migrate_pages,diff --git a/mm/autonuma.c b/mm/autonuma.c
index 4db53a1..cb02641 100644
--- a/mm/autonuma.c
+++ b/mm/autonuma.c
@@ -249,7 +249,8 @@ static bool autonuma_migrate_page(struct page *page, int dst_nid,
pages_migrated += isolated; /* FIXME: per node */
nr_remaining = migrate_pages(&migratepages,
alloc_migrate_dst_page,
- pgdat->node_id, false, MIGRATE_ASYNC);
+ pgdat->node_id, false, MIGRATE_ASYNC,
+ MR_AUTONUMA);
count_vm_events(NUMA_PAGE_MIGRATE, isolated - nr_remaining);
if (nr_remaining)
putback_lru_pages(&migratepages);
--
1.7.7
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>