linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Huan Yang <link@vivo.com>
To: Shakeel Butt <shakeel.butt@linux.dev>
Cc: Johannes Weiner <hannes@cmpxchg.org>,
	Michal Hocko <mhocko@kernel.org>,
	Roman Gushchin <roman.gushchin@linux.dev>,
	Muchun Song <muchun.song@linux.dev>,
	Andrew Morton <akpm@linux-foundation.org>,
	Petr Mladek <pmladek@suse.com>,
	Sebastian Andrzej Siewior <bigeasy@linutronix.de>,
	Francesco Valla <francesco@valla.it>,
	Huang Shijie <shijie@os.amperecomputing.com>,
	KP Singh <kpsingh@kernel.org>,
	"Paul E. McKenney" <paulmck@kernel.org>,
	Rasmus Villemoes <linux@rasmusvillemoes.dk>,
	"Uladzislau Rezki (Sony)" <urezki@gmail.com>,
	Guo Weikang <guoweikang.kernel@gmail.com>,
	Raul E Rangel <rrangel@chromium.org>,
	cgroups@vger.kernel.org, linux-mm@kvack.org,
	linux-kernel@vger.kernel.org, Boqun Feng <boqun.feng@gmail.com>,
	Geert Uytterhoeven <geert@linux-m68k.org>,
	Paul Moore <paul@paul-moore.com>,
	"Mike Rapoport (Microsoft)" <rppt@kernel.org>,
	opensource.kernel@vivo.com
Subject: Re: [PATCH v2 3/3] mm/memcg: introduce mem_cgroup_early_init
Date: Fri, 25 Apr 2025 09:11:32 +0800	[thread overview]
Message-ID: <c4ddc913-fcf5-43c4-b95e-7c71748dba03@vivo.com> (raw)
In-Reply-To: <2u4vpqa6do7tgtukqb7orgxmlixguexsxilhnsiwv7atssnht4@o4cwziz26wrs>


在 2025/4/25 00:00, Shakeel Butt 写道:
> On Thu, Apr 24, 2025 at 08:09:29PM +0800, Huan Yang wrote:
>> When cgroup_init() creates root_mem_cgroup through css_online callback,
>> some critical resources might not be fully initialized, forcing later
>> operations to perform conditional checks for resource availability.
>>
>> This patch introduces mem_cgroup_early_init() to address the init order,
>> it invoke before cgroup_init, so, compare mem_cgroup_init which invoked
>> by initcall, mem_cgroup_early_init can use to prepare some key resources
>> before root_mem_cgroup alloc.
>>
>> Signed-off-by: Huan Yang <link@vivo.com>
>> Suggested-by: Shakeel Butt <shakeel.butt@linux.dev>
> Please move this patch as the first patch of the series and also remove
> the "early" from the function name as it has a different meaning in the

OK,

Thanks.

> context of cgroup init. Something like either memcg_init() or
> memcg_kmem_caches_init().


      parent reply	other threads:[~2025-04-25  1:11 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-04-24 12:09 [PATCH v2 0/3] Use kmem_cache for memcg alloc Huan Yang
2025-04-24 12:09 ` [PATCH v2 1/3] mm/memcg: use kmem_cache when alloc memcg Huan Yang
2025-04-24 12:09 ` [PATCH v2 2/3] mm/memcg: use kmem_cache when alloc memcg pernode info Huan Yang
2025-04-24 12:09 ` [PATCH v2 3/3] mm/memcg: introduce mem_cgroup_early_init Huan Yang
2025-04-24 16:00   ` Shakeel Butt
2025-04-24 23:00     ` Shakeel Butt
2025-04-25  1:11       ` Huan Yang
2025-04-25  1:30         ` Shakeel Butt
2025-04-25  1:55           ` Huan Yang
2025-04-25  1:11     ` Huan Yang [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=c4ddc913-fcf5-43c4-b95e-7c71748dba03@vivo.com \
    --to=link@vivo.com \
    --cc=akpm@linux-foundation.org \
    --cc=bigeasy@linutronix.de \
    --cc=boqun.feng@gmail.com \
    --cc=cgroups@vger.kernel.org \
    --cc=francesco@valla.it \
    --cc=geert@linux-m68k.org \
    --cc=guoweikang.kernel@gmail.com \
    --cc=hannes@cmpxchg.org \
    --cc=kpsingh@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=linux@rasmusvillemoes.dk \
    --cc=mhocko@kernel.org \
    --cc=muchun.song@linux.dev \
    --cc=opensource.kernel@vivo.com \
    --cc=paul@paul-moore.com \
    --cc=paulmck@kernel.org \
    --cc=pmladek@suse.com \
    --cc=roman.gushchin@linux.dev \
    --cc=rppt@kernel.org \
    --cc=rrangel@chromium.org \
    --cc=shakeel.butt@linux.dev \
    --cc=shijie@os.amperecomputing.com \
    --cc=urezki@gmail.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