io-uring.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Drew DeVault" <sir@cmpwn.com>
To: <io-uring@vger.kernel.org>
Subject: Confusion regarding the use of OP_TIMEOUT
Date: Wed, 19 May 2021 15:51:35 -0400	[thread overview]
Message-ID: <CBHHFOFELZZ3.C2MWHZF690NB@taiga> (raw)

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?

             reply	other threads:[~2021-05-19 19:57 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-05-19 19:51 Drew DeVault [this message]
2021-05-20 10:11 ` Confusion regarding the use of OP_TIMEOUT Pavel Begunkov
2021-05-20 21:58   ` Drew DeVault
     [not found] <af3b1313-2e0a-16fc-facd-aa15dc69f64e@emobrien.com>
2021-05-20  0:32 ` Alex O'Brien
     [not found] <24207f62-fa0b-a52a-fa06-a39b4e208dd6@emobrien.com>
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 \
    --in-reply-to=CBHHFOFELZZ3.C2MWHZF690NB@taiga \
    --to=sir@cmpwn.com \
    --cc=io-uring@vger.kernel.org \
    /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;
as well as URLs for NNTP newsgroup(s).