Linux driver-core infrastructure
 help / color / mirror / Atom feed
From: Tejun Heo <tj@kernel.org>
To: Chris Down <chris@chrisdown.name>
Cc: "Greg Kroah-Hartman" <gregkh@linuxfoundation.org>,
	"Johannes Weiner" <hannes@cmpxchg.org>,
	"Michal Koutný" <mkoutny@suse.com>,
	"Serge Hallyn" <serge.hallyn@ubuntu.com>,
	driver-core@lists.linux.dev, cgroups@vger.kernel.org,
	linux-kernel@vger.kernel.org, kernel-team@meta.com
Subject: Re: [PATCH] kernfs: Build paths in linear time with respect to depth
Date: Sun, 15 Nov 2026 05:17:42 -1000	[thread overview]
Message-ID: <e4f172e286a51e9969b8a5cbf1a7da72@kernel.org> (raw)
In-Reply-To: <20261114142137.ecf5e6af6608b218@chrisdown.name>

Hello, Chris.

On Sat, Nov 14, 2026 at 02:21:37PM -0800, Chris Down wrote:
> What bothers me more is that whoever picks the depth isn't the one who is
> affected by it. cgroup.max.depth defaults to max, so anyone with a
> delegated subtree can make a deep chain. Every read of /proc/<pid>/cgroup
> for a task at the bottom of it then takes that long with css_set_lock held
> and IRQs off. It doesn't take five digits for that to become problematic,
> either.
...

I'd say three digits is already pretty extreme, and I think it's on the
parent to set cgroup.max.depth when delegating a subtree. It's similar to
e.g. memory.high. If the parent doesn't set it, a child can affect others
that are unrelated to it.

That said, I don't see any reason not to improve it.

Thanks.

--
tejun

      reply	other threads:[~2026-11-15 15:17 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-08  3:16 [PATCH] kernfs: Build paths in linear time with respect to depth Chris Down
2026-11-08  3:19 ` Chris Down
2026-11-09 15:43 ` Tejun Heo
2026-11-14 22:21   ` Chris Down
2026-11-15 15:17     ` Tejun Heo [this message]

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=e4f172e286a51e9969b8a5cbf1a7da72@kernel.org \
    --to=tj@kernel.org \
    --cc=cgroups@vger.kernel.org \
    --cc=chris@chrisdown.name \
    --cc=driver-core@lists.linux.dev \
    --cc=gregkh@linuxfoundation.org \
    --cc=hannes@cmpxchg.org \
    --cc=kernel-team@meta.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mkoutny@suse.com \
    --cc=serge.hallyn@ubuntu.com \
    /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