Re: [PATCH v3 4/8] memcg: replace stats_flush_lock with an atomic

From: Michal Koutný
Date: Tue Apr 04 2023 - 13:33:33 EST


On Tue, Apr 04, 2023 at 10:21:33AM -0700, Shakeel Butt <shakeelb@xxxxxxxxxx> wrote:
> > Yes indeed it is. Basically we want to avoid unconditional cache
> > dirtying. This pattern is also used at other places in the kernel like
> > qspinlock.

Thanks for confirmation.

(I remembered the commit 873f64b791a2 ("mm/memcontrol.c: remove the
redundant updating of stats_flush_threshold"). But was slightly confused
why would it be open-coded every time.)

> Oh also take a look at
> https://lore.kernel.org/all/20230404052228.15788-1-feng.tang@xxxxxxxxx/

Thanks for the link.

Michal

Attachment: signature.asc
Description: PGP signature