public inbox for [email protected]
 help / color / mirror / Atom feed
From: Pavel Begunkov <[email protected]>
To: Drew DeVault <[email protected]>, [email protected]
Subject: Re: Confusion regarding the use of OP_TIMEOUT
Date: Thu, 20 May 2021 11:11:20 +0100	[thread overview]
Message-ID: <[email protected]> (raw)
In-Reply-To: <CBHHFOFELZZ3.C2MWHZF690NB@taiga>

On 5/19/21 8:51 PM, 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.

Right

> 
> 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

...causes request submission (i.e. execution) to be delayed to be
exact, not CQE. But anyway sounds workable to me. (if timeout works
well) the second should not be submitted earlier than
submission_time + timeout. Or if timeout is marked DRAIN as well
would be batch1_completion_time + timeout.

> ultimately it fails with EINTR instead of just waiting to execute.

Does some request fails and you find such a CQE (which request?)?
Or a syscall? submission or waiting?

> 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?

-- 
Pavel Begunkov

  reply	other threads:[~2021-05-20 11:39 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-05-19 19:51 Confusion regarding the use of OP_TIMEOUT Drew DeVault
2021-05-20 10:11 ` Pavel Begunkov [this message]
2021-05-20 21:58   ` Drew DeVault
     [not found] <[email protected]>
2021-05-20  0:32 ` Alex O'Brien
     [not found] <[email protected]>
2021-05-20  0:34 ` Alex O'Brien

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    [email protected] \
    [email protected] \
    [email protected] \
    [email protected] \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox