Re: [PATCH] nvme-fabrics: limit nr_write_queues and nr_poll_queues when parsing

From: Nitesh Shetty

Date: Wed Nov 25 2026 - 05:29:06 EST


On 22/11/26 06:39PM, Andrew Stellman wrote:
nr_io_queues is limited to num_online_cpus() when the options are
parsed, but nr_write_queues and nr_poll_queues are stored as given.
nvme-tcp and nvme-rdma size the queue array with the unsigned int sum
nr_io_queues + nr_write_queues + nr_poll_queues + 1, which wraps for
large values, while nvmf_nr_io_queues() limits each term to the online
CPUs and so asks for more I/O queues than were allocated.

With 4 CPUs and nr_write_queues=2147483647 nr_poll_queues=2147483647 on
nvme-tcp, the sum wraps to 3, three queues are allocated and 12 I/O
queues are created:


Reviewed-by: Nitesh Shetty <nj.shetty@xxxxxxxxxxx>