On 1/8/20 11:09 PM, Daurnimator wrote: > On Thu, 9 Jan 2020 at 03:25, Jens Axboe <axboe@xxxxxxxxx> 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