Re: [PATCH] io_uring: use TWA_SIGNAL for task_work related to eventfd

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, Aug 7, 2020 at 1:57 AM Jens Axboe <axboe@xxxxxxxxx> 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?



[Index of Archives]     [Linux Samsung SoC]     [Linux Rockchip SoC]     [Linux Actions SoC]     [Linux for Synopsys ARC Processors]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]


  Powered by Linux