Re: [PATCH v2 2/2] memcg: periodically flush the memcg stats

From: Shakeel Butt
Date: Thu Jun 24 2021 - 11:00:48 EST


On Thu, Jun 24, 2021 at 7:01 AM Michal Koutný <mkoutny@xxxxxxxx> wrote:
>
> Hello Shakeel.
>
> On Tue, Jun 15, 2021 at 10:44:35AM -0700, Shakeel Butt <shakeelb@xxxxxxxxxx> wrote:
> > At the moment memcg stats are read in four contexts:
> >
> > 1. memcg stat user interfaces
> > 2. dirty throttling
> > 3. page fault
> > 4. memory reclaim
>
> Sorry for being dense or ignorant -- what do you refer to with the point
> no. 3 (memcg stats reader during page fault)?
>

Yes, specifically workingset_refault() which reads lruvec stats
directly through lruvec_page_state and indirectly through
lru_note_cost_page.