Commit af1839d7 authored by Mel Gorman's avatar Mel Gorman Committed by Linus Torvalds
Browse files

mm: numa: trace tasks that fail migration due to rate limiting

A low local/remote numa hinting fault ratio is potentially explained by
failed migrations.  This patch adds a tracepoint that fires when
migration fails due to migration rate limitation.
Signed-off-by: default avatarMel Gorman <>
Reviewed-by: default avatarRik van Riel <>
Cc: Alex Thorlton <>
Signed-off-by: default avatarAndrew Morton <>
Signed-off-by: default avatarLinus Torvalds <>
parent 1c5e9c27
......@@ -45,6 +45,32 @@ TRACE_EVENT(mm_migrate_pages,
__print_symbolic(__entry->reason, MIGRATE_REASON))
TP_PROTO(struct task_struct *p, int dst_nid, unsigned long nr_pages),
TP_ARGS(p, dst_nid, nr_pages),
__array( char, comm, TASK_COMM_LEN)
__field( pid_t, pid)
__field( int, dst_nid)
__field( unsigned long, nr_pages)
memcpy(__entry->comm, p->comm, TASK_COMM_LEN);
__entry->pid = p->pid;
__entry->dst_nid = dst_nid;
__entry->nr_pages = nr_pages;
TP_printk("comm=%s pid=%d dst_nid=%d nr_pages=%lu",
#endif /* _TRACE_MIGRATE_H */
/* This part must be outside protection */
......@@ -1614,8 +1614,11 @@ static bool numamigrate_update_ratelimit(pg_data_t *pgdat,
if (pgdat->numabalancing_migrate_nr_pages > ratelimit_pages)
if (pgdat->numabalancing_migrate_nr_pages > ratelimit_pages) {
trace_mm_numa_migrate_ratelimit(current, pgdat->node_id,
return true;
* This is an unlocked non-atomic update so errors are possible.
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment