Re: Confusion regarding the use of OP_TIMEOUT

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

 



On 5/20/21 10:19 AM, Drew DeVault wrote:
> On Wed May 19, 2021 at 8:18 PM EDT, Alex O'Brien wrote:
>> On 5/20/21 5:51 AM, Drew DeVault wrote:
>>> Hi folks! I'm trying to use IO_TIMEOUT to insert a pause in the middle
>>> of my SQ. I set the off (desired number of events to wait for) to zero,
>>> which according to the docs just makes it behave like a timer.
>>>
>>> Essentially, I want the following:
>>>
>>> [operations...]
>>> OP_TIMEOUT
>>> [operations...]
>>>
>>> To be well-ordered, so that the second batch executes after the first.
>>> To accomplish this, I've tried to submit the first operation of the
>>> second batch with IO_DRAIN, which causes the CQE to be delayed, but
>>> ultimately it fails with EINTR instead of just waiting to execute.
>>>
>>> I understand that the primary motivator for OP_TIMEOUT is to provide a
>>> timeout functionality for other CQEs. Is my use-case not accomodated by
>>> io_uring?
>>
>> Have you tried setting `IO_DRAIN` on the timeout operation itself?
> 
> Tried it just now. Does not appear to change the results.
> 

Hm. Sorry, that was my one concrete idea. (I do think that's more what
you want, since it should guarantee that the timeout only starts after
the first batch completes). Maybe there's some weirdness due to the fact
that OP_TIMEOUT actually returns -ETIME on expiration, rather than
"succeeding", though I don't actually know how IO_DRAIN behaves in the
presence of preceding failures.

-- 
- Alex O'Brien
<alex@xxxxxxxxxxxx>



[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