IO-Uring Archive on lore.kernel.org
 help / color / 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
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 index

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-01-07 15:55 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 publically 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

IO-Uring Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/io-uring/0 io-uring/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 io-uring io-uring/ https://lore.kernel.org/io-uring \
		io-uring@vger.kernel.org
	public-inbox-index io-uring

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.kernel.vger.io-uring


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git