[PATCH v6 2/2] nvme-tcp: allow setting per-queue io_cpu through sysfs
Saravanan D
saravanand at crusoe.ai
Wed Nov 4 00:00:26 PST 2026
On 10/30/26 7:45 AM, Nilay Shroff wrote:
> I see here nvme_queue_dir_create() is invoked on every reconnect. Although
> it is guarded by ctrl->queues_kobj, the directory is controller-lifetime
> state, so it would be cleaner to create it once from nvme_add_ctrl().
>
> Moreover, this also makes the ownership asymmetric: nvme-tcp creates the
> queues directory, but nvme-core removes it from nvme_uninit_ctrl(). Could
> nvme-core manage both creation and destruction instead?
>
> One way to do that is to add queue_attr_groups to struct nvme_ctrl_ops.
Thanks for this suggestion. In v7 I will add queue_attr_groups to struct
nvme_ctrl_ops. For a transport that sets it, nvme_add_ctrl() will
create the queues directory after cdev_device_add(), and
nvme_uninit_ctrl() will remove it. With nvme-core owning the directory,
nvme_queue_dir_create() no longer needs to be exported, and
nvme_add_queue_info() will take the groups from ctrl->ops, so nvme-tcp
only adds and removes the per queue directories.
Thanks,
Saravanan D.
More information about the Linux-nvme
mailing list