Re: __io_file_supports_nowait for regular files

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

 



On 7/21/22 10:23 AM, Christoph Hellwig wrote:
> On Thu, Jul 21, 2022 at 09:59:40AM -0600, Jens Axboe wrote:
>> On 7/21/22 9:37 AM, Christoph Hellwig wrote:
>>> Hi Jens,
>>>
>>> is there any good reason __io_file_supports_nowait checks the
>>> blk_queue_nowait flag for regular files?  The FMODE_NOWAIT is set
>>> for regular files that support nowait I/O, and should be all that
>>> is needed.  Even with a block device that does not nonblocking
>>> I/O some thing like reading from the page cache can be done
>>> non-blocking.
>>
>> Nope, we can probably kill that check then. Want to send a patch?
> 
> What would be a good way to verify it doesn't break any strange
> assumptions?  I kinda don't fell too comfortable touching io_uring
> guts.

Looking a bit deeper at this, FMODE_NOWAIT is about the file. The nowait
check for the bdev is about whether the driver honors NOWAIT
submissions. Any blk-mq driver will be fine, bio based ones probably
not. You could very well end up blocking off the submit path in that
case.

I'm not convinced we don't still need that check.

-- 
Jens Axboe




[Index of Archives]     [Linux Samsung SoC]     [Linux Rockchip SoC]     [Linux Actions SoC]     [Linux for Synopsys ARC Processors]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]


  Powered by Linux