From: "T.J. Mercier" <tjmercier@google.com>
To: Johannes Weiner <hannes@cmpxchg.org>
Cc: Michal Hocko <mhocko@kernel.org>,
Roman Gushchin <roman.gushchin@linux.dev>,
Shakeel Butt <shakeelb@google.com>,
Muchun Song <muchun.song@linux.dev>,
Andrew Morton <akpm@linux-foundation.org>,
android-mm@google.com, Minchan Kim <minchan@google.com>,
cgroups@vger.kernel.org, linux-mm@kvack.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] mm: memcg: Don't periodically flush stats when memcg is disabled
Date: Fri, 26 Jan 2024 13:20:48 -0800 [thread overview]
Message-ID: <CABdmKX2mZwVHSvJekT8UNt2a0WiiNnTTW-ZV=ZHvx0D1PoJuhQ@mail.gmail.com> (raw)
In-Reply-To: <20240126210642.GK1567330@cmpxchg.org>
On Fri, Jan 26, 2024 at 1:06 PM Johannes Weiner <hannes@cmpxchg.org> wrote:
>
> On Fri, Jan 26, 2024 at 08:33:52PM +0000, T.J. Mercier wrote:
> > The root memcg is onlined even when memcg is disabled. When it's onlined
> > a 2 second periodic stat flush is started, but no stat flushing is
> > required when memcg is disabled because there can be no child memcgs.
> > Most calls to flush memcg stats are avoided when memcg is disabled as a
> > result of the mem_cgroup_disabled check [1] added in [2], but the
> > periodic flushing started in mem_cgroup_css_online is not. Skip it.
> >
> > [1] https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/mm/memcontrol.c?h=v6.8-rc1#n753
> > [2] https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=7d7ef0a4686abe43cd76a141b340a348f45ecdf2
> >
> > Fixes: aa48e47e3906 ("memcg: infrastructure to flush memcg stats")
> > Reported-by: Minchan Kim <minchan@google.com>
> > Signed-off-by: T.J. Mercier <tjmercier@google.com>
>
> With what Shakeel pointed out resolved:
>
> Acked-by: Johannes Weiner <hannes@cmpxchg.org>
Thanks Shakeel and Johannes. v2 is here, hopefully fixed up correctly:
https://lore.kernel.org/all/20240126211927.1171338-1-tjmercier@google.com/
prev parent reply other threads:[~2024-01-26 21:21 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-01-26 20:33 [PATCH] mm: memcg: Don't periodically flush stats when memcg is disabled T.J. Mercier
2024-01-26 21:02 ` Shakeel Butt
2024-01-26 21:06 ` Johannes Weiner
2024-01-26 21:20 ` T.J. Mercier [this message]
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='CABdmKX2mZwVHSvJekT8UNt2a0WiiNnTTW-ZV=ZHvx0D1PoJuhQ@mail.gmail.com' \
--to=tjmercier@google.com \
--cc=akpm@linux-foundation.org \
--cc=android-mm@google.com \
--cc=cgroups@vger.kernel.org \
--cc=hannes@cmpxchg.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=mhocko@kernel.org \
--cc=minchan@google.com \
--cc=muchun.song@linux.dev \
--cc=roman.gushchin@linux.dev \
--cc=shakeelb@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).