Re: [PATCH] mm: memcg: flush empty per-cpu stock slots on memcg offlining
From: Michal Hocko
Date: Mon Aug 17 2026 - 04:32:34 EST
On Mon 17-08-26 10:59:17, Song Hu wrote:
> refill_stock() takes a css reference for each cached memcg slot and
> mem_cgroup_css_offline() relies on drain_all_stock() to release those
> references before the cgroup can finish dying.
>
> consume_stock() can drive a slot's nr_pages to zero while its cached[]
> pointer stays set.
Is there any specific reason why the memcg stays in the cache slot
without any pages?
--
Michal Hocko
SUSE Labs