Re: [PATCH 1/2] cgroup: Add generation number with cgroup id
From: Tejun Heo
Date: Fri Oct 25 2019 - 06:57:00 EST
Hello,
On Fri, Oct 25, 2019 at 06:38:00PM +0900, Namhyung Kim wrote:
> On Fri, Oct 25, 2019 at 5:30 PM Namhyung Kim <namhyung@xxxxxxxxxx> wrote:
> > > > /*
> > > > * A cgroup_root represents the root of a cgroup hierarchy, and may be
> > > > * associated with a kernfs_root to form an active hierarchy. This is
> > > > @@ -521,7 +529,7 @@ struct cgroup_root {
> > > > unsigned int flags;
> > > >
> > > > /* IDs for cgroups in this hierarchy */
> > > > - struct idr cgroup_idr;
> > > > + struct cgroup_idr cgroup_idr;
> > >
> > > Given that there's cgroup->self css, can we get rid of the above?
> >
> > I don't follow. Do you want to remove cgroup_idr and share the
> > css_idr for cgroup id?
Yeah, so, each cgroup has its own css at cgroup->self which has css id
and everything, so I was wondering whether it'd make sense to get rid
of the cgroup id and use cgroup->self.id in its place.
Thanks.
--
tejun