From: Tejun Heo <tj@kernel.org>
To: Peng Yu <yupeng0921@gmail.com>
Cc: "Christoph Hellwig" <hch@lst.de>,
"Sagi Grimberg" <sagi@grimberg.me>,
"Chaitanya Kulkarni" <kch@nvidia.com>,
"Johannes Weiner" <hannes@cmpxchg.org>,
"Michal Koutný" <mkoutny@suse.com>,
"Josef Bacik" <josef@toxicpanda.com>,
"Jens Axboe" <axboe@kernel.dk>,
"Maurizio Lombardi" <mlombard@arkamax.eu>,
cgroups@vger.kernel.org, linux-block@vger.kernel.org,
linux-nvme@lists.infradead.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v3] nvmet: add cgroup_path to charge namespace I/O to a cgroup
Date: Wed, 23 Sep 2026 06:38:50 -1000 [thread overview]
Message-ID: <700928ff02d35c58ccba15ec371f2e8b@kernel.org> (raw)
In-Reply-To: <20260923152653.40953-1-yupeng0921@gmail.com>
Hello, Peng.
On Wed, 23 Sep 2026 08:26:53 -0700, Peng Yu wrote:
> Implementation:
> * Add a `cgroup_path` attribute under the nvmet namespace folder, e.g.:
> /sys/kernel/config/nvmet/subsystems/nqn.2026-09.io.test01:bdev/namespaces/1/cgroup_path
Maybe take a cgroup ID instead of a path? Userspace can read it as the
inode number of the cgroup directory, and cgroup_get_from_id() resolves it
at enable time the same way cgroup_get_from_path() does now. The attribute
then becomes a u64, which drops the string allocation and freeing along
with the path validation. IDs are also never reused, while a path can
later name a different cgroup created at the same location.
Thanks.
--
tejun
prev parent reply other threads:[~2026-09-23 16:38 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-23 15:26 Peng Yu
2026-09-23 15:53 ` Michal Koutný
2026-09-24 4:34 ` peng yu
2026-09-25 9:59 ` Michal Koutný
2026-09-26 5:24 ` peng yu
2026-09-23 16:38 ` 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=700928ff02d35c58ccba15ec371f2e8b@kernel.org \
--to=tj@kernel.org \
--cc=axboe@kernel.dk \
--cc=cgroups@vger.kernel.org \
--cc=hannes@cmpxchg.org \
--cc=hch@lst.de \
--cc=josef@toxicpanda.com \
--cc=kch@nvidia.com \
--cc=linux-block@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-nvme@lists.infradead.org \
--cc=mkoutny@suse.com \
--cc=mlombard@arkamax.eu \
--cc=sagi@grimberg.me \
--cc=yupeng0921@gmail.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
all inboxes | Powered by JetHome®