lkml.org 
[lkml]   [2012]   [Oct]   [22]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
Subject[PATCH 5/5] mm: autonuma: Specify the migration reason for the tracepoint
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


\
 
 \ /
  Last update: 2012-10-22 11:01    [W:0.072 / U:0.156 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site