Re: [PATCH] nvme: utilize two queue maps, one for reads and one for writes

From: Jens Axboe
Date: Thu Nov 15 2018 - 13:38:27 EST


On 11/15/18 11:28 AM, Guenter Roeck wrote:
> Hi Jens,
>
>> I think the below patch should fix it.
>>
> Sorry I wasn't able to test this earlier. Looks like it does
> fix the problem; the problem is no longer seen in next-20181115.
> Minor comment below.

That's fine, thanks for testing!

>> /*
>> - * Need IRQs for read+write queues, and one for the admin queue
>> + * Need IRQs for read+write queues, and one for the admin queue.
>> + * If we can't get more than one vector, we have to share the
>> + * admin queue and IO queue vector. For that case, don't add
>> + * an extra vector for the admin queue, or we'll continue
>> + * asking for 2 and get -ENOSPC in return.
>> */
>> - nr_io_queues = irq_sets[0] + irq_sets[1] + 1;
>> + if (result == -ENOSPC && nr_io_queues == 1)
>> + nr_io_queues = 1;
>
> Setting nr_io_queues to 1 when it already is set to 1 doesn't really do
> anything. Is this for clarification ?

Guess that does look a bit odd, alternative would be to flip the
condition, but I think this one is easier to read.

--
Jens Axboe