Re: [mm-unstable v4 5/5] mm: memcg: restore subtree stats flushing

From: Bagas Sanjaya
Date: Sat Dec 02 2023 - 00:53:38 EST


On 12/2/23 09:56, Waiman Long wrote:
>
> On 12/1/23 20:57, Bagas Sanjaya wrote:
>>> -void mem_cgroup_flush_stats(void)
>>> +/*
>>> + * mem_cgroup_flush_stats - flush the stats of a memory cgroup subtree
>>> + * @memcg: root of the subtree to flush
>>> + *
>>> + * Flushing is serialized by the underlying global rstat lock. There is also a
>>> + * minimum amount of work to be done even if there are no stat updates to flush.
>>> + * Hence, we only flush the stats if the updates delta exceeds a threshold. This
>>> + * avoids unnecessary work and contention on the underlying lock.
>>> + */
>> What is global rstat lock?
>
> It is the cgroup_rstat_lock in kernel/cgroup/rstat.c.
>

OK, I see that. Thanks!

--
An old man doll... just what I always wanted! - Clara