[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20240423211903.aofflj5wanozhat7@quack3>
Date: Tue, 23 Apr 2024 23:19:03 +0200
From: Jan Kara <jack@...e.cz>
To: Tejun Heo <tj@...nel.org>
Cc: Jan Kara <jack@...e.cz>, Xiu Jianfeng <xiujianfeng@...wei.com>,
viro@...iv.linux.org.uk, brauner@...nel.org,
lizefan.x@...edance.com, hannes@...xchg.org, mhocko@...nel.org,
roman.gushchin@...ux.dev, shakeel.butt@...ux.dev,
muchun.song@...ux.dev, akpm@...ux-foundation.org,
linux-fsdevel@...r.kernel.org, linux-kernel@...r.kernel.org,
cgroups@...r.kernel.org, linux-mm@...ck.org
Subject: Re: [PATCH -next] cgroup: Introduce css_is_online() helper
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@...wei.com>
> >
> > Looks good. Feel free to add:
> >
> > Reviewed-by: Jan Kara <jack@...e.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@...e.com>
SUSE Labs, CR
Powered by blists - more mailing lists