Re: [PATCH -next] cgroup: Introduce css_is_online() helper

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxx>
> > 
> > Looks good. Feel free to add:
> > 
> > Reviewed-by: Jan Kara <jack@xxxxxxx>
> 
> 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@xxxxxxxx>
SUSE Labs, CR




[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [eCos]     [Asterisk Internet PBX]     [Linux API]     [Monitors]

  Powered by Linux