* [folded-merged] mm-memcg-restore-subtree-stats-flushing-fix-2.patch removed from -mm tree
@ 2023-12-20 22:37 Andrew Morton
0 siblings, 0 replies; only message in thread
From: Andrew Morton @ 2023-12-20 22:37 UTC (permalink / raw)
To: mm-commits, weixugc, tj, shakeelb, roman.gushchin, muchun.song,
mkoutny, mhocko, longman, ivan, hannes, gthelen, chrisl,
cerasuolodomenico, yosryahmed, akpm
The quilt patch titled
Subject: mm: memcg: remove stats flushing mutex
has been removed from the -mm tree. Its filename was
mm-memcg-restore-subtree-stats-flushing-fix-2.patch
This patch was dropped because it was folded into mm-memcg-restore-subtree-stats-flushing.patch
------------------------------------------------------
From: Yosry Ahmed <yosryahmed@google.com>
Subject: mm: memcg: remove stats flushing mutex
Date: Mon, 4 Dec 2023 23:43:29 +0000
The mutex was intended to make the waiters sleep instead of spin, and such
that we can check the update thresholds again after acquiring the mutex.
However, the mutex has a risk of priority inversion, especially since the
underlying rstat lock can de dropped while the mutex is held.
Synthetic testing with high concurrency of flushers shows no regressions
without the mutex, so remove it.
Link: https://lkml.kernel.org/r/CAJD7tkZgP3m-VVPn+fF_YuvXeQYK=tZZjJHj=dzD=CcSSpp2qg@mail.gmail.com
Signed-off-by: Yosry Ahmed <yosryahmed@google.com>
Suggested-by: Shakeel Butt <shakeelb@google.com>
Acked-by: Shakeel Butt <shakeelb@google.com>
Cc: Chris Li <chrisl@kernel.org>
Cc: Domenico Cerasuolo <cerasuolodomenico@gmail.com>
Cc: Greg Thelen <gthelen@google.com>
Cc: Ivan Babrou <ivan@cloudflare.com>
Cc: Johannes Weiner <hannes@cmpxchg.org>
Cc: Michal Hocko <mhocko@kernel.org>
Cc: Michal Koutny <mkoutny@suse.com>
Cc: Muchun Song <muchun.song@linux.dev>
Cc: Roman Gushchin <roman.gushchin@linux.dev>
Cc: Tejun Heo <tj@kernel.org>
Cc: Waiman Long <longman@redhat.com>
Cc: Wei Xu <weixugc@google.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---
mm/memcontrol.c | 11 ++---------
1 file changed, 2 insertions(+), 9 deletions(-)
--- a/mm/memcontrol.c~mm-memcg-restore-subtree-stats-flushing-fix-2
+++ a/mm/memcontrol.c
@@ -749,21 +749,14 @@ static void do_flush_stats(struct mem_cg
*/
void mem_cgroup_flush_stats(struct mem_cgroup *memcg)
{
- static DEFINE_MUTEX(memcg_stats_flush_mutex);
-
if (mem_cgroup_disabled())
return;
if (!memcg)
memcg = root_mem_cgroup;
- if (memcg_should_flush_stats(memcg)) {
- mutex_lock(&memcg_stats_flush_mutex);
- /* Check again after locking, another flush may have occurred */
- if (memcg_should_flush_stats(memcg))
- do_flush_stats(memcg);
- mutex_unlock(&memcg_stats_flush_mutex);
- }
+ if (memcg_should_flush_stats(memcg))
+ do_flush_stats(memcg);
}
void mem_cgroup_flush_stats_ratelimited(struct mem_cgroup *memcg)
_
Patches currently in -mm which might be from yosryahmed@google.com are
mm-memcg-change-flush_next_time-to-flush_last_time.patch
mm-memcg-move-vmstats-structs-definition-above-flushing-code.patch
mm-memcg-make-stats-flushing-threshold-per-memcg.patch
mm-workingset-move-the-stats-flush-into-workingset_test_recent.patch
mm-memcg-restore-subtree-stats-flushing.patch
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2023-12-20 22:37 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-12-20 22:37 [folded-merged] mm-memcg-restore-subtree-stats-flushing-fix-2.patch removed from -mm tree 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.