cgroups.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: xiujianfeng <xiujianfeng@huawei.com>
To: Roman Gushchin <roman.gushchin@linux.dev>,
	Michal Hocko <mhocko@suse.com>
Cc: <hannes@cmpxchg.org>, <shakeel.butt@linux.dev>,
	<muchun.song@linux.dev>, <akpm@linux-foundation.org>,
	<cgroups@vger.kernel.org>, <linux-mm@kvack.org>,
	<linux-kernel@vger.kernel.org>
Subject: Re: [PATCH -next] memcg: don't handle event_list for v2 when offlining
Date: Wed, 15 May 2024 10:47:07 +0800	[thread overview]
Message-ID: <41fdf6cb-ec1b-ff07-44f4-3ba01b45ebda@huawei.com> (raw)
In-Reply-To: <ZkOBaNffNi4rmR8h@P9FQF9L96D>



On 2024/5/14 23:21, Roman Gushchin wrote:
> On Tue, May 14, 2024 at 04:09:58PM +0200, Michal Hocko wrote:
>> On Tue 14-05-24 13:11:06, Xiu Jianfeng wrote:
>>> The event_list for memcg is only valid for v1 and not used for v2,
>>> so it's unnessesary to handle event_list for v2.
>>
>> You are right but the code as is works just fine. The list will be
>> empty. It is true that we do not need to take event_list_lock lock but
>> nobody should be using this lock anyway. Also the offline callback is
>> not particularly hot path. So why do we want to change the code?
> 
> +1 to that.
> 
> Plus this code will be moved to a separate function in mm/memcontrol-v1.c
> and luckily can be compiled out entirely for users who don't need the
> cgroup v1 support.

I found the patchset you mentioned, Thanks.

> 
> Thanks!

  reply	other threads:[~2024-05-15  2:47 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-05-14 13:11 [PATCH -next] memcg: don't handle event_list for v2 when offlining Xiu Jianfeng
2024-05-14 14:09 ` Michal Hocko
2024-05-14 15:21   ` Roman Gushchin
2024-05-15  2:47     ` xiujianfeng [this message]
2024-05-15  2:45   ` xiujianfeng

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=41fdf6cb-ec1b-ff07-44f4-3ba01b45ebda@huawei.com \
    --to=xiujianfeng@huawei.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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).