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>,
"Keith Busch" <kbusch@kernel.org>,
"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 v9] nvmet: add cgroup_id to charge namespace I/O to a cgroup
Date: Fri, 23 Oct 2026 10:26:30 -1000 [thread overview]
Message-ID: <aee729fd53ef9c7c084a443216cfeb39@kernel.org> (raw)
In-Reply-To: <20261023043423.176002-1-yupeng0921@gmail.com>
Hello, Peng.
On Thu, Oct 22, 2026 at 09:34:23PM -0700, Peng Yu wrote:
> + /*
> + * The I/O commands of a namespace with a cgroup, except Reservation
> + * commands, are executed from ->blkcg_work on ->blkcg_wq, so the
> + * cgroup's throttling doesn't put a transport context to sleep.
> + */
> + struct workqueue_struct *blkcg_wq;
> + struct llist_head blkcg_reqs;
> + struct work_struct blkcg_work;
All commands of the namespace go through the single blkcg_work, so they
execute one at a time on one worker. Can't each command embed its own
work item and be queued on blkcg_wq instead? For an unbound workqueue,
max_active applies to the whole system, so blkcg_wq's max_active can
just be set to the number of CPUs. That would be simpler and might
remove the performance degradation too.
Thanks.
--
tejun
prev parent reply other threads:[~2026-10-23 20:26 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-23 4:34 [PATCH v9] nvmet: add cgroup_id to charge namespace I/O to a cgroup Peng Yu
2026-10-23 20:26 ` 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=aee729fd53ef9c7c084a443216cfeb39@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=kbusch@kernel.org \
--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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.