Re: [PATCH] memcg: trim the per-cpu charge stock instead of draining it
From: Michal Hocko
Date: Wed Aug 19 2026 - 03:03:28 EST
On Tue 18-08-26 21:17:46, Joshua Hahn wrote:
> On Tue, 18 Aug 2026 12:03:07 +0200 Michal Hocko <mhocko@xxxxxxxx> wrote:
> > The idea is sound. I would just not increase the overall stock size in
> > the same patch. Fine tuning can be done independently and ideally with
> > some numbers.
> > Would it make sense to start with MEMCG_STOCK_HIGH := MEMCG_CHARGE_BATCH
> > and MEMCG_CHARGE_BATCH := MEMCG_CHARGE_BATCH / 2. That would preserve
> > the maximum stock size while preventing all or nothing behavior which is
> > indeed suboptimal and pushing charging path to a slower path way too
> > aggressively.
>
> I like this idea and I think you meant { MEMCG_CHARGE_LOW :=
> MEMCG_CHARGE_BATCH / 2 } right?
Correct. Wrong auto-completion on my end.
--
Michal Hocko
SUSE Labs