[PATCH v9] nvmet: add cgroup_id to charge namespace I/O to a cgroup
Tejun Heo
tj at kernel.org
Fri Oct 23 13:26:30 PDT 2026
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
More information about the Linux-nvme
mailing list