Re: [PATCH] io_uring: fix blocking inline submission

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

 



On 6/9/21 4:07 PM, Jens Axboe wrote:
> On 6/9/21 5:07 AM, Pavel Begunkov wrote:
>> There is a complaint against sys_io_uring_enter() blocking if it submits
>> stdin reads. The problem is in __io_file_supports_async(), which
>> sees that it's a cdev and allows it to be processed inline.
>>
>> Punt char devices using generic rules of io_file_supports_async(),
>> including checking for presence of *_iter() versions of rw callbacks.
>> Apparently, it will affect most of cdevs with some exceptions like
>> null and zero devices.
> 
> I don't like this, we really should fix the file types, they are
> broken if they don't honor IOCB_NOWAIT and have ->read_iter() (or
> the write equiv).
> 
> For cases where there is no iter variant of the read/write handlers,
> then yes we should not return true from __io_file_supports_async().

I'm confused. The patch doesn't punt them unconditionally, but make
it go through the generic path of __io_file_supports_async()
including checks for read_iter/write_iter. So if a chrdev has
*_iter() it should continue to work as before.

It fixes the symptom that means the change punts it async, and so
I assume tty doesn't have _iter()s for some reason. Will take a
look at the tty driver soon to stop blind guessing.

-- 
Pavel Begunkov



[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