linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Jan Kara <jack@suse.cz>
To: Tejun Heo <tj@kernel.org>
Cc: Jan Kara <jack@suse.cz>, 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 23:19:03 +0200	[thread overview]
Message-ID: <20240423211903.aofflj5wanozhat7@quack3> (raw)
In-Reply-To: <ZifaNsx9wFDp8m-_@slm.duckdns.org>

On Tue 23-04-24 05:56:38, Tejun Heo wrote:
> 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.

Yeah OK. I felt the motivation was so that writeback code doesn't have to
peek into cgroup "internals" so I'm fine with the change from writeback
POV.  But if you don't see the point from cgroup side than sure I'm fine
without this change as well.

								Honza

-- 
Jan Kara <jack@suse.com>
SUSE Labs, CR


      reply	other threads:[~2024-04-23 21:19 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
2024-04-23 21:19     ` Jan Kara [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=20240423211903.aofflj5wanozhat7@quack3 \
    --to=jack@suse.cz \
    --cc=akpm@linux-foundation.org \
    --cc=brauner@kernel.org \
    --cc=cgroups@vger.kernel.org \
    --cc=hannes@cmpxchg.org \
    --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=tj@kernel.org \
    --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