Re: [PATCH v5 2/2] nvme-tcp: allow setting per-queue io_cpu through sysfs

From: Saravanan D

Date: Tue Nov 24 2026 - 04:29:43 EST


On Wed, Oct 21, 2026 at 10:19:37AM +0200, Daniel Wagner wrote:
> However, to make this truly user-friendly, I think nvme-cli should be
> extended so it is aware of this and can configure it directly. I've
> merged Nilay's --nr-io-queues patches, so this is the natural next
> feature nvme-cli should support; see commit:
>
> e170d6985797 ("news: document the use of --nr-io-queues during nvme connect")

Hi Daniel,

Now that Keith has queued v8 for 7.5, I have started on the nvme-cli
support and I would like to get alignment on the command shape.

To show the values, I plan to have show-topology and its JSON output
list io_cpu and managed for each queue of a TCP controller, next to
the existing per controller fields such as NUMANode and Reconnects.

Setting io_cpu cannot follow --nr-io-queues as a connect option,
because the kernel only exposes it in sysfs once the queues exist. As
far as I can tell no nvme-cli command writes a kernel sysfs attribute
today, and the only writes are the vendor defaults libnvme applies
after a connect. So I am proposing a new command

nvme set-io-cpu <ctrl> --qid=<qid> --cpu=<cpu>

backed by a libnvme call that reads and writes queues/<qid>/io_cpu.
When privilege separation is in use, the helper's handle_set_attr()
would gain an io_cpu case that only accepts a valid controller name, a
numeric qid and a cpu number or -1, alongside ctrl_loss_tmo and
iopolicy.

Would you prefer a different name or home for this, for example a more
general command for setting controller attributes?

I can post the series as soon as we agree on the command. If you
would rather wait for the kernel patches to land in Linus's tree, I
will hold it until then.

Thanks,
Saravanan D.