v1
2026-11-03
根memcg统计直读全局计数器 · v1
回收、refault、zswap shrinker与DAMON配额读根memcg统计时不再flush全局rstat,直接读始终最新的全局计数器。
原始补丁链接
子 Patch(3)
1/3
mm: zswap: fix shrinker count for the root memcg
On Mon, Nov 2, 2026 at 2:51 PM Joanne Koong joannelkoong@gmail.com wrote: > > zswap_shrinker_count() scales the number of freeable entries on a > memcg’s zswap LRU by the memcg’s compression ratio.
2/3
mm: memcg: read root lruvec LRU stats from the node counters
diff –git a/mm/memcontrol.c b/mm/memcontrol.c > index ac6c43ea8c5a..938843346571 100644 > — a/mm/memcontrol.c > +++ b/mm/memcontrol.c > @@ -587,6 +587,50 @@ unsigned long lruvec_page_state_local(
3/3
mm/damon/core: use node counters instead of flushing the root memcg
damos_get_node_memcg_used_bp 对 root memcg 跳过全系统 memcg stats flush,改用 lruvec_lru_page_state 读 node counters,避免每次评估都高开销刷新。