All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andrew Morton <akpm@linux-foundation.org>
To: mm-commits@vger.kernel.org,weixugc@google.com,tj@kernel.org,shakeelb@google.com,roman.gushchin@linux.dev,muchun.song@linux.dev,mkoutny@suse.com,mhocko@kernel.org,longman@redhat.com,ivan@cloudflare.com,hannes@cmpxchg.org,gthelen@google.com,chrisl@kernel.org,cerasuolodomenico@gmail.com,yosryahmed@google.com,akpm@linux-foundation.org
Subject: [folded-merged] mm-memcg-restore-subtree-stats-flushing-fix-2.patch removed from -mm tree
Date: Wed, 20 Dec 2023 14:37:56 -0800	[thread overview]
Message-ID: <20231220223757.342EEC433CB@smtp.kernel.org> (raw)


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


                 reply	other threads:[~2023-12-20 22:37 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20231220223757.342EEC433CB@smtp.kernel.org \
    --to=akpm@linux-foundation.org \
    --cc=cerasuolodomenico@gmail.com \
    --cc=chrisl@kernel.org \
    --cc=gthelen@google.com \
    --cc=hannes@cmpxchg.org \
    --cc=ivan@cloudflare.com \
    --cc=longman@redhat.com \
    --cc=mhocko@kernel.org \
    --cc=mkoutny@suse.com \
    --cc=mm-commits@vger.kernel.org \
    --cc=muchun.song@linux.dev \
    --cc=roman.gushchin@linux.dev \
    --cc=shakeelb@google.com \
    --cc=tj@kernel.org \
    --cc=weixugc@google.com \
    --cc=yosryahmed@google.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.