[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAM9d7chWpj105TYR0qP3T8FJ=-2wjp+sh6Rk8zkvJb_ugtL3Dw@mail.gmail.com>
Date: Fri, 25 Oct 2019 17:30:35 +0900
From: Namhyung Kim <namhyung@...nel.org>
To: Tejun Heo <tj@...nel.org>
Cc: Johannes Weiner <hannes@...xchg.org>,
Li Zefan <lizefan@...wei.com>,
LKML <linux-kernel@...r.kernel.org>,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
"Rafael J. Wysocki" <rafael@...nel.org>,
Song Liu <liu.song.a23@...il.com>
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@...nel.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
Powered by blists - more mailing lists