Commit ba5e9579 authored by yalin wang's avatar yalin wang Committed by Linus Torvalds
Browse files

mm: change mm_vmscan_lru_shrink_inactive() proto types

Move node_id zone_idx shrink flags into trace function, so thay we don't
need caculate these args if the trace is disabled, and will make this
function have less arguments.
Signed-off-by: default avataryalin wang <>
Reviewed-by: default avatarSteven Rostedt <>
Acked-by: default avatarVlastimil Babka <>
Signed-off-by: default avatarAndrew Morton <>
Signed-off-by: default avatarLinus Torvalds <>
parent 8ef5849f
......@@ -352,11 +352,11 @@ TRACE_EVENT(mm_vmscan_writepage,
TP_PROTO(int nid, int zid,
unsigned long nr_scanned, unsigned long nr_reclaimed,
int priority, int reclaim_flags),
TP_PROTO(struct zone *zone,
unsigned long nr_scanned, unsigned long nr_reclaimed,
int priority, int file),
TP_ARGS(nid, zid, nr_scanned, nr_reclaimed, priority, reclaim_flags),
TP_ARGS(zone, nr_scanned, nr_reclaimed, priority, file),
__field(int, nid)
......@@ -368,12 +368,12 @@ TRACE_EVENT(mm_vmscan_lru_shrink_inactive,
__entry->nid = nid;
__entry->zid = zid;
__entry->nid = zone_to_nid(zone);
__entry->zid = zone_idx(zone);
__entry->nr_scanned = nr_scanned;
__entry->nr_reclaimed = nr_reclaimed;
__entry->priority = priority;
__entry->reclaim_flags = reclaim_flags;
__entry->reclaim_flags = trace_shrink_flags(file);
TP_printk("nid=%d zid=%d nr_scanned=%ld nr_reclaimed=%ld priority=%d flags=%s",
......@@ -1691,11 +1691,8 @@ shrink_inactive_list(unsigned long nr_to_scan, struct lruvec *lruvec,
wait_iff_congested(zone, BLK_RW_ASYNC, HZ/10);
nr_scanned, nr_reclaimed,
trace_mm_vmscan_lru_shrink_inactive(zone, nr_scanned, nr_reclaimed,
sc->priority, file);
return nr_reclaimed;
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