Re: [PATCH] mm: memcg: flush empty per-cpu stock slots on memcg offlining

Michal Hocko <[email protected]>
Newsgroups org.kernel.vger.cgroups,org.kernel.vger.linux-kernel,org.kvack.linux-mm
Message-ID <aoMMr6kEX7pW1dSF@tiehlicka>
On Mon 17-08-26 21:12:21, Song Hu wrote:
> On Mon 17-08-26, Michal Hocko wrote:
> > Is there any specific reason why the memcg stays in the cache slot
> > without any pages?
> 
> consume_stock() doesn't release the slot when nr_pages hits zero.  It
> is kept for the next charge of the same task and only gets displaced
> by a charge under a different memcg or by CPU hotplug.  The problem is
> that the offlining drain skips empty slots, so the css reference they
> hold is never dropped unless something unrelated displaces them.

This doesn't answer my question, really, does it? Is there any good
reason for this implementation? Why do we need to drop references
remotely when we can do so when the last cached charge is consumed?

-- 
Michal Hocko
SUSE Labs
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.