Skip to content

Commit 912c057

Browse files
shakeelbtorvalds
authored andcommitted
mm: vmscan: consistent update to pgrefill
The vmstat pgrefill is useful together with pgscan and pgsteal stats to measure the reclaim efficiency. However vmstat's pgrefill is not updated consistently at system level. It gets updated for both global and memcg reclaim however pgscan and pgsteal are updated for only global reclaim. So, update pgrefill only for global reclaim. If someone is interested in the stats representing both system level as well as memcg level reclaim, then consult the root memcg's memory.stat instead of /proc/vmstat. Signed-off-by: Shakeel Butt <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Acked-by: Yafang Shao <[email protected]> Acked-by: Roman Gushchin <[email protected]> Acked-by: Chris Down <[email protected]> Cc: Johannes Weiner <[email protected]> Cc: Michal Hocko <[email protected]> Link: http://lkml.kernel.org/r/[email protected] Signed-off-by: Linus Torvalds <[email protected]>
1 parent 238c304 commit 912c057

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

mm/vmscan.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2030,7 +2030,8 @@ static void shrink_active_list(unsigned long nr_to_scan,
20302030

20312031
__mod_node_page_state(pgdat, NR_ISOLATED_ANON + file, nr_taken);
20322032

2033-
__count_vm_events(PGREFILL, nr_scanned);
2033+
if (!cgroup_reclaim(sc))
2034+
__count_vm_events(PGREFILL, nr_scanned);
20342035
__count_memcg_events(lruvec_memcg(lruvec), PGREFILL, nr_scanned);
20352036

20362037
spin_unlock_irq(&pgdat->lru_lock);

0 commit comments

Comments
 (0)