From: Hugh Dickins <hughd@google.com>
To: Johannes Weiner <hannes@cmpxchg.org>
Cc: Andrew Morton <akpm@linux-foundation.org>,
Michal Hocko <mhocko@suse.com>,
Roman Gushchin <roman.gushchin@linux.dev>,
Shakeel Butt <shakeel.butt@linux.dev>,
Muchun Song <muchun.song@linux.dev>,
linux-mm@kvack.org, cgroups@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] mm: memcontrol: move memsw charge callbacks to v1
Date: Thu, 23 Jan 2025 22:53:04 -0800 (PST) [thread overview]
Message-ID: <a90b33c3-7ea3-5375-3fcd-c97cc13c9964@google.com> (raw)
In-Reply-To: <20250124054132.45643-1-hannes@cmpxchg.org>
On Fri, 24 Jan 2025, Johannes Weiner wrote:
> The interweaving of two entirely different swap accounting strategies
> has been one of the more confusing parts of the memcg code. Split out
> the v1 code to clarify the implementation and a handful of callsites,
> and to avoid building the v1 bits when !CONFIG_MEMCG_V1.
>
> text data bss dec hex filename
> 39253 6446 4160 49859 c2c3 mm/memcontrol.o.old
> 38877 6382 4160 49419 c10b mm/memcontrol.o
>
> Signed-off-by: Johannes Weiner <hannes@cmpxchg.org>
I'm not really looking at this, but want to chime in that I found the
memcg1 swap stuff in mm/memcontrol.c, not in mm/memcontrol-v1.c, very
misleading when I was doing the folio_unqueue_deferred_split() business:
so, without looking into the details of it, strongly approve of the
direction you're taking here - thank you.
But thought you could go even further, given that
static inline bool do_memsw_account(void)
{
return !cgroup_subsys_on_dfl(memory_cgrp_subsys);
}
I thought that amounted to do_memsw_account iff memcg_v1;
but I never did grasp cgroup_subsys_on_dfl very well,
so ignore me if I'm making no sense to you.
Hugh
next prev parent reply other threads:[~2025-01-24 6:53 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-01-24 5:41 Johannes Weiner
2025-01-24 6:53 ` Hugh Dickins [this message]
2025-01-24 15:54 ` Johannes Weiner
2025-01-27 2:59 ` Hugh Dickins
2025-01-25 1:25 ` Roman Gushchin
2025-01-27 6:31 ` Shakeel Butt
2025-01-27 12:51 ` Michal Hocko
2025-01-28 21:26 ` Shakeel Butt
2025-01-28 22:36 ` Balbir Singh
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=a90b33c3-7ea3-5375-3fcd-c97cc13c9964@google.com \
--to=hughd@google.com \
--cc=akpm@linux-foundation.org \
--cc=cgroups@vger.kernel.org \
--cc=hannes@cmpxchg.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=mhocko@suse.com \
--cc=muchun.song@linux.dev \
--cc=roman.gushchin@linux.dev \
--cc=shakeel.butt@linux.dev \
/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