Re: [PATCH] mm: writeback: ratelimit stat flush from mem_cgroup_wb_stats

From: Roman Gushchin
Date: Thu Jan 18 2024 - 17:43:02 EST


On Thu, Jan 18, 2024 at 06:42:35PM +0000, Shakeel Butt wrote:
> One of our workloads (Postgres 14) has regressed when migrated from 5.10
> to 6.1 upstream kernel. The regression can be reproduced by sysbench's
> oltp_write_only benchmark. It seems like the always on rstat flush in
> mem_cgroup_wb_stats() is causing the regression. So, rate limit that
> specific rstat flush. One potential consequence would be the dirty
> throttling might be decided on stale memcg stats. However from our
> benchmarks and production traffic we have not observed any change in the
> dirty throttling behavior of the application.
>
> Signed-off-by: Shakeel Butt <shakeelb@xxxxxxxxxx>

Acked-by: Roman Gushchin <roman.gushchin@xxxxxxxxx>

Thanks!