[PATCH 0/1] nvmet: allow user to set req alloc flag

Logan Gunthorpe logang at deltatee.com
Tue Oct 20 11:39:28 EDT 2020



On 2020-10-20 2:22 a.m., Sagi Grimberg wrote:
> 
>> Hi,
>>
>> When using NVMeOF target in the passthru mode we allocate the request
>> with BLK_MQ_REQ_NOWAIT flag. This allocates the request in the following
>> manner :-
>>
>> nvme_alloc_request()
>>   blk_mq_alloc_rquest()
>>    blk_mq_queue_enter()
>>     if (flag & BLK_MQ_REQ_NOWAIT)
>>    	return -EBUSY; <-- return if busy.
>>
>> On the NVMe controller which I've the fio random write workload running
>> parallel on 32 namespaces with higher queue depth results in I/O error,
>> where blk_mq_queue_enter() returning -EBUSY as shown above. This problem
>> is not easy to reproduce but occurs once in a while with following error
>> (See 1 for detailed log) :-
>>
>> test1: (groupid=0, jobs=32): err= 5
>> (file:io_u.c:1744, func=io_u error, error=Input/output error):
>>
>> When the flag BLK_MQ_REQ_NOWAIT is removed from the allocation the
>> workload doen't result in the error.
>>
>> This patch fixes the problem with the request allocation by adding
>> a new configfs attribute so that user can optionally decide whether
>> to use BLK_MQ_REQ_NOWAIT or not. We retain the default behavior by
>> using BLK_MQ_REQ_NOWAIT when creating the nvmet passthru subsystem.
> 
> Why should we ever set REQ_NOWAIT at all? Nothing prevents the
> host(s) queue depth from exceeding the controller queue depth...

I agree... I certainly found adding a configfs attribute for this rather
off-putting. Why would the user want an option that turns on random errors?

Logan




More information about the Linux-nvme mailing list