linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Tejun Heo <tj@kernel.org>
To: Jan Kara <jack@suse.cz>
Cc: Xiu Jianfeng <xiujianfeng@huawei.com>,
	viro@zeniv.linux.org.uk, brauner@kernel.org,
	lizefan.x@bytedance.com, hannes@cmpxchg.org, mhocko@kernel.org,
	roman.gushchin@linux.dev, shakeel.butt@linux.dev,
	muchun.song@linux.dev, akpm@linux-foundation.org,
	linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org,
	cgroups@vger.kernel.org, linux-mm@kvack.org
Subject: Re: [PATCH -next] cgroup: Introduce css_is_online() helper
Date: Tue, 23 Apr 2024 05:56:38 -1000	[thread overview]
Message-ID: <ZifaNsx9wFDp8m-_@slm.duckdns.org> (raw)
In-Reply-To: <20240423134923.osuljlalsd27awz3@quack3>

Hello,

On Tue, Apr 23, 2024 at 03:49:23PM +0200, Jan Kara wrote:
> On Sat 20-04-24 09:44:28, Xiu Jianfeng wrote:
> > Introduce css_is_online() helper to test if whether the specified
> > css is online, avoid testing css.flags with CSS_ONLINE directly
> > outside of cgroup.c.
> > 
> > Signed-off-by: Xiu Jianfeng <xiujianfeng@huawei.com>
> 
> Looks good. Feel free to add:
> 
> Reviewed-by: Jan Kara <jack@suse.cz>

I'm a bit skeptical about these trivial helpers. If the test is something
more involved or has complications which need documentation (e.g. regarding
synchronization and what not), the helper would be useful even if it's just
as a place to centrally document what's going on. However, here, it's just
testing one flag and I'm not sure what benefits the helper brings.

Thanks.

-- 
tejun


  reply	other threads:[~2024-04-23 15:56 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-04-20  9:44 Xiu Jianfeng
2024-04-23 13:49 ` Jan Kara
2024-04-23 15:56   ` Tejun Heo [this message]
2024-04-23 21:19     ` Jan Kara

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=ZifaNsx9wFDp8m-_@slm.duckdns.org \
    --to=tj@kernel.org \
    --cc=akpm@linux-foundation.org \
    --cc=brauner@kernel.org \
    --cc=cgroups@vger.kernel.org \
    --cc=hannes@cmpxchg.org \
    --cc=jack@suse.cz \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=lizefan.x@bytedance.com \
    --cc=mhocko@kernel.org \
    --cc=muchun.song@linux.dev \
    --cc=roman.gushchin@linux.dev \
    --cc=shakeel.butt@linux.dev \
    --cc=viro@zeniv.linux.org.uk \
    --cc=xiujianfeng@huawei.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