* + mm-writeback-ratelimit-stat-flush-from-mem_cgroup_wb_stats.patch added to mm-unstable branch
@ 2024-01-18 22:15 Andrew Morton
0 siblings, 0 replies; only message in thread
From: Andrew Morton @ 2024-01-18 22:15 UTC (permalink / raw)
To: mm-commits, tj, roman.gushchin, muchun.song, mhocko, jack, hannes,
axboe, shakeelb, akpm
The patch titled
Subject: mm: writeback: ratelimit stat flush from mem_cgroup_wb_stats
has been added to the -mm mm-unstable branch. Its filename is
mm-writeback-ratelimit-stat-flush-from-mem_cgroup_wb_stats.patch
This patch will shortly appear at
https://git.kernel.org/pub/scm/linux/kernel/git/akpm/25-new.git/tree/patches/mm-writeback-ratelimit-stat-flush-from-mem_cgroup_wb_stats.patch
This patch will later appear in the mm-unstable branch at
git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm
Before you just go and hit "reply", please:
a) Consider who else should be cc'ed
b) Prefer to cc a suitable mailing list as well
c) Ideally: find the original patch on the mailing list and do a
reply-to-all to that, adding suitable additional cc's
*** Remember to use Documentation/process/submit-checklist.rst when testing your code ***
The -mm tree is included into linux-next via the mm-everything
branch at git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm
and is updated there every 2-3 working days
------------------------------------------------------
From: Shakeel Butt <shakeelb@google.com>
Subject: mm: writeback: ratelimit stat flush from mem_cgroup_wb_stats
Date: Thu, 18 Jan 2024 18:42:35 +0000
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.
Link: https://lkml.kernel.org/r/20240118184235.618164-1-shakeelb@google.com
Signed-off-by: Shakeel Butt <shakeelb@google.com>
Acked-by: Johannes Weiner <hannes@cmpxchg.org>
Cc: Jan Kara <jack@suse.cz>
Cc: Jens Axboe <axboe@kernel.dk>
Cc: Michal Hocko <mhocko@kernel.org>
Cc: Muchun Song <muchun.song@linux.dev>
Cc: Roman Gushchin <roman.gushchin@linux.dev>
Cc: Tejun Heo <tj@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---
mm/memcontrol.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- a/mm/memcontrol.c~mm-writeback-ratelimit-stat-flush-from-mem_cgroup_wb_stats
+++ a/mm/memcontrol.c
@@ -4795,7 +4795,7 @@ void mem_cgroup_wb_stats(struct bdi_writ
struct mem_cgroup *memcg = mem_cgroup_from_css(wb->memcg_css);
struct mem_cgroup *parent;
- mem_cgroup_flush_stats(memcg);
+ mem_cgroup_flush_stats_ratelimited(memcg);
*pdirty = memcg_page_state(memcg, NR_FILE_DIRTY);
*pwriteback = memcg_page_state(memcg, NR_WRITEBACK);
_
Patches currently in -mm which might be from shakeelb@google.com are
mm-writeback-ratelimit-stat-flush-from-mem_cgroup_wb_stats.patch
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2024-01-18 22:16 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-01-18 22:15 + mm-writeback-ratelimit-stat-flush-from-mem_cgroup_wb_stats.patch added to mm-unstable branch Andrew Morton
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.