Re: [PATCH] blk-mq: enable IO poll if .nr_queues of type poll > 0

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 12/18/18 1:09 AM, Ming Lei wrote:
> On Tue, Dec 18, 2018 at 07:47:39AM +0100, Christoph Hellwig wrote:
>> On Mon, Dec 17, 2018 at 09:34:55PM -0700, Jens Axboe wrote:
>>> On 12/17/18 9:15 PM, Ming Lei wrote:
>>>> The queue mapping of type poll only exists when set->map[HCTX_TYPE_POLL].nr_queues
>>>> is bigger than zero, so enhance the constraint by checking .nr_queues of type poll
>>>> before enabling IO poll.
>>>>
>>>> Otherwise IO race & timeout can be observed when running block/007.
>>>
>>> Looks good to me, but we might consider having a helper for this, since
>>> we have this check in 3 places now. But for now this is good, thanks
>>> Ming.
>>
>> Jens, if you want this I can drop the nvme patch to set nr_maps to 2
>> as it wouldn't be needed.  Not sure which one is more elegant, but
>> I guess Mings version is a little more fool proof.
> 
> For READ queue type, its .nr_maps can be 3 and .nr_queues is zero, so
> if check on the two queue type is kept as consistent, we may get good
> code readability, IMO.
> 
> As Jens mentioned, we may introduce blk_mq_queue_type_supported() helper
> to cover both.

I think that would be preferable.

-- 
Jens Axboe




[Index of Archives]     [Linux RAID]     [Linux SCSI]     [Linux ATA RAID]     [IDE]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Device Mapper]

  Powered by Linux