Commit 16709d1d authored by Mel Gorman's avatar Mel Gorman Committed by Linus Torvalds

mm: vmstat: replace __count_zone_vm_events with a zone id equivalent

This is partially a preparation patch for more vmstat work but it also
has the slight advantage that __count_zid_vm_events is cheaper to
calculate than __count_zone_vm_events().

Link: default avatarMel Gorman <>
Acked-by: default avatarVlastimil Babka <>
Cc: Hillf Danton <>
Acked-by: default avatarJohannes Weiner <>
Cc: Joonsoo Kim <>
Cc: Michal Hocko <>
Cc: Minchan Kim <>
Cc: Rik van Riel <>
Signed-off-by: default avatarAndrew Morton <>
Signed-off-by: default avatarLinus Torvalds <>
parent 3b8c0be4
......@@ -101,9 +101,8 @@ static inline void vm_events_fold_cpu(int cpu)
#define count_vm_vmacache_event(x) do {} while (0)
#define __count_zone_vm_events(item, zone, delta) \
__count_vm_events(item##_NORMAL - ZONE_NORMAL + \
zone_idx(zone), delta)
#define __count_zid_vm_events(item, zid, delta) \
__count_vm_events(item##_NORMAL - ZONE_NORMAL + zid, delta)
* Zone and node-based page accounting with per cpu differentials.
......@@ -2616,7 +2616,7 @@ struct page *buffered_rmqueue(struct zone *preferred_zone,
__count_zone_vm_events(PGALLOC, zone, 1 << order);
__count_zid_vm_events(PGALLOC, page_zonenum(page), 1 << order);
zone_statistics(preferred_zone, zone, gfp_flags);
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