[PATCH blktests] nvme/081: test the per-queue io_cpu sysfs attribute
Saravanan D
saravanand at crusoe.ai
Tue Nov 10 03:49:42 PST 2026
On Mon, Nov 09, 2026 at 07:13:27PM +0530, Nilay Shroff wrote:
> > + _nvme_connect_subsys --keep-alive-tmo 1 --reconnect-delay 2
>
> How about adding connection option "--nr-io-queues 2"? If we add
> this option then we may not need to have the requirement of
> _require_min_cpus 2. I think, we shall be able to run this test
> also on the system with only one cpu.
I added --nr-io-queues 2, which pins the queue count. The test still
needs _require_min_cpus 2 though. nvmf_parse_options() caps
nr_io_queues at num_online_cpus(), so a single CPU host still gets one
I/O queue, and the test needs queues 1 and 2.
> Can we also add one more test here which tests whether "$qdir"
> exists or not?
Yes. v2 checks the queues directory and the io_cpu attribute
separately, with a skip reason for each, so a kernel that has only the
first patch of the series reports which part is missing.
> I think using --nr-io-queues option would also replace the above relative
> comparison with an exact comparison based on num of queues selected.
Yes. The test now expects exactly two queue directories after connect,
and a different count fails the test instead of skipping it.
> The reset test could be updated to ensure that number of queues
> remains unchanged after controller reset. Current test_reset()
> verifies that the io_cpu and managed attributes retain their expected
> values after reset. However, it doesn't explicitly verify that the
> queue directories were recreated with the same count. I would capture
> the queue_count before reset and compare it afterward as well as
> ensure that queue_count matches with nr_queue_dirs.
v2 reads queue_count before the reset and checks that it is unchanged
afterwards. queue_count includes the admin queue, so the test then
checks that the number of queue directories is queue_count - 1.
I will send v2 in reply to this mail. Thanks also for reviewing both
kernel patches.
Thanks,
Saravanan D.
More information about the Linux-nvme
mailing list