Messages in this thread | | | From | Namhyung Kim <> | Date | Fri, 25 Oct 2019 17:30:35 +0900 | Subject | Re: [PATCH 1/2] cgroup: Add generation number with cgroup id |
| |
Hi Tejun,
On Fri, Oct 25, 2019 at 2:44 AM Tejun Heo <tj@kernel.org> wrote: > On Wed, Oct 16, 2019 at 09:50:18PM +0900, Namhyung Kim wrote: > > Later 64 bit system can have a simpler implementation with a single 64 > > bit sequence number and a RB tree. But it'll need to grab a spinlock > > during lookup. I'm not entirely sure it's ok, so I left it as is. > > Any chance I can persuade you into making this conversion? idr is > exactly the wrong data structure to use for cyclic allocations. We've > been doing it mostly for historical reasons but I really hope we can > move away from it. These lookups aren't in super hot paths and doing > locked lookups should be fine.
As you know, it entails change in kernfs id and its users. And I really want to finish the perf cgroup sampling work first. Can I work on this after the perf work is done?
> > > /* > > * 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?
Thanks Namhyung
| |