Hi. On Thu, Sep 17, 2026 at 10:57:00AM -0700, Joshua Hahn wrote: > > This is true, but this is already the behavior for vanilla memcg. > In this series I'm hoping to preserve all existing semantics without > changing behaviors, so I can fix this problem in a separate issue. > > Specifically, in vanilla try_charge_memcg: > > done_restock: > if (batch > nr_pages) > refill_stock(memcg, batch - nr_pages); > > ... > current->memcg_nr_pages_over_high += batch; > > So I've just preserved the exact semantics that we used to have before. Kudos to you for the conservative approach. > > The problem isn't that big anyways though, it's a transient inflation > in memcg_over_high and will be wiped on the next high handling run, > and there is no effect on accounting or permanent inflations. It reminds me [1] where stockage imprecision could even trigger OOM but it was reportedly only visible in LTP. HTH, Michal [1] https://lore.kernel.org/all/20250530151858.672391-1-mkoutny@suse.com/