public inbox for [email protected]
 help / color / mirror / Atom feed
From: Jann Horn <[email protected]>
To: Jens Axboe <[email protected]>
Cc: io-uring <[email protected]>
Subject: Re: [PATCH] io_uring: use TWA_SIGNAL for task_work related to eventfd
Date: Fri, 7 Aug 2020 03:00:17 +0200	[thread overview]
Message-ID: <CAG48ez0QE3+a1Gb8ovEv_54wG-HA=Ph7fM4MT8EU8Exti0c_SQ@mail.gmail.com> (raw)
In-Reply-To: <[email protected]>

On Fri, Aug 7, 2020 at 1:57 AM Jens Axboe <[email protected]> wrote:
> An earlier commit:
>
> b7db41c9e03b ("io_uring: fix regression with always ignoring signals in io_cqring_wait()")
>
> ensured that we didn't get stuck waiting for eventfd reads when it's
> registered with the io_uring ring for event notification, but that didn't
> cover the general case of waiting on eventfd and having that dependency
> between io_uring and eventfd.
>
> Ensure that we use signaled notification for anything related to eventfd.
[...]
> @@ -1720,7 +1720,7 @@ static int io_req_task_work_add(struct io_kiocb *req, struct callback_head *cb)
>          */
>         if (ctx->flags & IORING_SETUP_SQPOLL)
>                 notify = 0;
> -       else if (ctx->cq_ev_fd)
> +       else if (ctx->cq_ev_fd || (req->file && eventfd_file(req->file)))
>                 notify = TWA_SIGNAL;

Is the idea here that you want "polling an eventfd" to have different
UAPI semantics compared to e.g. "polling a pipe"? Or is there
something in-kernel that makes eventfds special?

  reply	other threads:[~2020-08-07  1:00 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-08-06 23:57 [PATCH] io_uring: use TWA_SIGNAL for task_work related to eventfd Jens Axboe
2020-08-07  1:00 ` Jann Horn [this message]
2020-08-07  1:10   ` Jens Axboe

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='CAG48ez0QE3+a1Gb8ovEv_54wG-HA=Ph7fM4MT8EU8Exti0c_SQ@mail.gmail.com' \
    [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