All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jens Axboe <axboe@kernel.dk>
To: Daurnimator <quae@daurnimator.com>
Cc: Mark Papadakis <markuspapadakis@icloud.com>, io-uring@vger.kernel.org
Subject: Re: io_uring and spurious wake-ups from eventfd
Date: Thu, 9 Jan 2020 08:14:26 -0700	[thread overview]
Message-ID: <fea925d2-b9a2-72e5-d1ed-59c7adf86171@kernel.dk> (raw)
In-Reply-To: <CAEnbY+fSuT+bBztpOUNJY3cq2pZ6tbFvKkSUeY+mEVwjtdNDow@mail.gmail.com>

On 1/8/20 11:09 PM, Daurnimator wrote:
> On Thu, 9 Jan 2020 at 03:25, Jens Axboe <axboe@kernel.dk> wrote:
>> I see what you're saying, so essentially only trigger eventfd
>> notifications if the completions happen async. That does make a lot of
>> sense, and it would be cleaner than having to flag this per request as
>> well. I think we'd still need to make that opt-in as it changes the
>> behavior of it.
>>
>> The best way to do that would be to add IORING_REGISTER_EVENTFD_ASYNC or
>> something like that. Does the exact same thing as
>> IORING_REGISTER_EVENTFD, but only triggers it if completions happen
>> async.
>>
>> What do you think?
> 
> 
> Why would a new opcode be cleaner than using a flag for the existing
> EVENTFD opcode?

A few reasons I can think of:

1) We don't consume an IOSQE flag, which is a pretty sparse resource.
2) This is generally behavior where you either want one or the other,
   not a mix. Hence a general setup/modify flag makes more sense to me.

-- 
Jens Axboe


      reply	other threads:[~2020-01-09 15:14 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-01-07 15:55 io_uring and spurious wake-ups from eventfd Mark Papadakis
2020-01-07 20:26 ` Jens Axboe
2020-01-07 20:34   ` Jens Axboe
2020-01-08  7:36     ` Mark Papadakis
2020-01-08 16:24       ` Jens Axboe
2020-01-08 16:46         ` Mark Papadakis
2020-01-08 16:50           ` Jens Axboe
2020-01-08 17:20             ` Jens Axboe
2020-01-08 18:08               ` Jens Axboe
2020-01-09  6:09         ` Daurnimator
2020-01-09 15:14           ` Jens Axboe [this message]

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=fea925d2-b9a2-72e5-d1ed-59c7adf86171@kernel.dk \
    --to=axboe@kernel.dk \
    --cc=io-uring@vger.kernel.org \
    --cc=markuspapadakis@icloud.com \
    --cc=quae@daurnimator.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.