mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Roman Gushchin <roman.gushchin@linux.dev>
To: Tao Cui <cui.tao@linux.dev>
Cc: Johannes Weiner <hannes@cmpxchg.org>,
	Michal Hocko <mhocko@suse.com>,
	Shakeel Butt <shakeel.butt@linux.dev>,
	muchun.song@linux.dev, cgroups@vger.kernel.org,
	linux-mm@kvack.org, linux-kernel@vger.kernel.org,
	Tao Cui <cuitao@kylinos.cn>,
	cui.tao@linux.dev
Subject: Re: [RFC PATCH 0/3] mm, memcg: isolate deprecated v1 state from struct mem_cgroup
Date: Thu, 29 Oct 2026 23:05:53 -0700	[thread overview]
Message-ID: <0BEF7489-16EC-44EE-847B-A6AA380BE11F@linux.dev> (raw)
In-Reply-To: <b36ab4a7-b692-49e8-92b5-1dc4d76dee00@linux.dev>

I believe we want to delete this code sooner than later, why would we rewrite it before that?

> On Oct 29, 2026, at 10:40 PM, Tao Cui <cui.tao@linux.dev> wrote:
> 
> Hi Johannes, Shakeel, Michal,
> 
>> 在 2026/9/19 00:24, Johannes Weiner 写道:
>>> On Fri, Sep 18, 2026 at 11:41:09AM +0200, Michal Hocko wrote:
>>> On Thu 17-09-26 13:26:40, Shakeel Butt wrote:
>>>> On Wed, Sep 16, 2026 at 08:57:34PM +0800, Tao Cui wrote:
>>>>> From: Tao Cui <cuitao@kylinos.cn>
>>>>> 
>>>>> The legacy cgroup v1 memory controller has already been moved out of
>>>>> the shared implementation at the file level (mm/memcontrol-v1.c) and at
>>>>> the Kconfig level (CONFIG_MEMCG_V1, default n since 6.11).  Its
>>>>> per-cgroup state, however, still sits as individual members inside
>>>>> struct mem_cgroup, guarded by #ifdefs.
>>>>> 
>>>>> This series isolates the deprecated implementation from the shared hot
>>>>> structure: all v1-only members are grouped into a dedicated
>>>>> struct mem_cgroup_v1, and every access goes through memcg->v1.X.
>>>>> 
>>>>> With this in place the v1 implementation is self-contained: its
>>>>> interface in mm/memcontrol-v1.c, its state in struct mem_cgroup_v1, and
>>>>> its eventual removal becomes a localized deletion of this struct
>>>>> together with mm/memcontrol-v1.c, instead of unwinding
>>>>> ifdef-scattered members across the shared header.
>>>> 
>>>> Sorry I don't see any benefit of this code churn. The code is already behind
>>>> config. What exactly this code churn is giving us?
>>> 
>>> The only arguable upside is that this would make it ever so slightly
>>> easier to track v1 specific stuff (once that s@v1@memcg1@ or similar).
>> 
>> I had the same thought. It's kiiind of nice to see which members are
>> completely specific to memcg1.
>> 
>>> I am not convinced this is sufficient to justify the churn either.
>> 
>> IMO it helps that it's mostly in memcontrol-v1.c where the chances of
>> interfering with other work are pretty slim.
>> 
>> The patch 1 + patch 2 split is a bit bothersome: indenting everything
>> into a union, only to then move it out in the next patch.
>> 
>> Tao, if you folded these two patches to make it one clean extraction
>> and changed over the sites at the same time, I would probably lean
>> supportive on this.
> 
> Sorry for the late reply.
> 
> Thanks for the feedback.  Looking back, I think Johannes' point about
> the patch split is fair.  I split the first two patches to keep the
> initial step semantically neutral, but it also made the series look
> like churn for the sake of churn.
> 
> I'll fold the first two patches into a single extraction in the next
> revision.  That should present the change more directly and hopefully
> make it easier to judge whether the resulting boundary is worthwhile.
> 
> Thanks,
> Tao
> 
> 

      reply	other threads:[~2026-10-30  6:06 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-09-16 12:57 Tao Cui
2026-09-16 12:57 ` [PATCH 1/3] mm, memcg: introduce struct mem_cgroup_v1 Tao Cui
2026-09-16 12:57 ` [PATCH 2/3] mm, memcg: move v1-only members into mem_cgroup_v1 Tao Cui
2026-09-16 12:57 ` [PATCH 3/3] docs: cgroup-v1: note the v1 memory controller implementation boundary Tao Cui
2026-09-17 20:26 ` [RFC PATCH 0/3] mm, memcg: isolate deprecated v1 state from struct mem_cgroup Shakeel Butt
2026-09-18  9:41   ` Michal Hocko
2026-09-18 10:22     ` Tao Cui
2026-09-18 16:24     ` Johannes Weiner
2026-10-30  5:40       ` Tao Cui
2026-10-30  6:05         ` Roman Gushchin [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=0BEF7489-16EC-44EE-847B-A6AA380BE11F@linux.dev \
    --to=roman.gushchin@linux.dev \
    --cc=cgroups@vger.kernel.org \
    --cc=cui.tao@linux.dev \
    --cc=cuitao@kylinos.cn \
    --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=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

all inboxes | Powered by JetHome®