mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Tejun Heo <tj@kernel.org>
To: Namhyung Kim <namhyung@kernel.org>
Cc: Johannes Weiner <hannes@cmpxchg.org>,
	Li Zefan <lizefan@huawei.com>,
	LKML <linux-kernel@vger.kernel.org>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	"Rafael J. Wysocki" <rafael@kernel.org>,
	Song Liu <liu.song.a23@gmail.com>
Subject: Re: [PATCH 1/2] cgroup: Add generation number with cgroup id
Date: Fri, 25 Oct 2019 04:06:23 -0700	[thread overview]
Message-ID: <20191025110623.GH3622521@devbig004.ftw2.facebook.com> (raw)
In-Reply-To: <CAM9d7chWpj105TYR0qP3T8FJ=-2wjp+sh6Rk8zkvJb_ugtL3Dw@mail.gmail.com>

Hello,

On Fri, Oct 25, 2019 at 05:30:35PM +0900, Namhyung Kim wrote:
> > 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?

Sure, but I think we should get the userland visible behaviors right.
Ignoring implementation details:

* cgroup vs. css IDs doesn't matter for now.  css IDs aren't visible
  to userland anyway and it could be that keeping using idr as-is or
  always using 64bit IDs is the better solution for them.

* On 32bit ino setups, 32bit ino + gen as cgroup and export fs IDs.

* On 64bit ino setups, 64bit unique ino (allocated whichever way) + 0
  gen as cgroup and export fs IDs.

Thanks.

-- 
tejun

  parent reply	other threads:[~2019-10-25 11:06 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-10-16 12:50 [PATCH 0/2] cgroup: Sync cgroup id and inode number Namhyung Kim
2019-10-16 12:50 ` [PATCH 1/2] cgroup: Add generation number with cgroup id Namhyung Kim
2019-10-24 17:44   ` Tejun Heo
2019-10-25  8:30     ` Namhyung Kim
2019-10-25  9:38       ` Namhyung Kim
2019-10-25 10:56         ` Tejun Heo
2019-10-26 11:32           ` Namhyung Kim
2019-10-25 11:06       ` Tejun Heo [this message]
2019-10-25 18:47         ` Tejun Heo
2019-10-26 11:42           ` Namhyung Kim
2019-11-01  0:47             ` Namhyung Kim
2019-10-26 11:40         ` Namhyung Kim
2019-10-16 12:50 ` [PATCH 2/2] kernfs: Allow creation with external gen + ino numbers Namhyung Kim
2019-10-24 17:52   ` Tejun Heo
2019-10-25  8:46     ` Namhyung Kim

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20191025110623.GH3622521@devbig004.ftw2.facebook.com \
    --to=tj@kernel.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=hannes@cmpxchg.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=liu.song.a23@gmail.com \
    --cc=lizefan@huawei.com \
    --cc=namhyung@kernel.org \
    --cc=rafael@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

Powered by JetHome