* [PATCH] io_uring: use call_rcu_hurry if signaling an eventfd
@ 2022-12-15 18:41 Dylan Yudaken
2022-12-15 18:44 ` Paul E. McKenney
2022-12-15 18:49 ` Jens Axboe
0 siblings, 2 replies; 4+ messages in thread
From: Dylan Yudaken @ 2022-12-15 18:41 UTC (permalink / raw)
To: Jens Axboe, Pavel Begunkov
Cc: io-uring, linux-kernel, kernel-team, Dylan Yudaken,
Joel Fernandes, Paul E . McKenney
io_uring uses call_rcu in the case it needs to signal an eventfd as a
result of an eventfd signal, since recursing eventfd signals are not
allowed. This should be calling the new call_rcu_hurry API to not delay
the signal.
Signed-off-by: Dylan Yudaken <[email protected]>
Cc: Joel Fernandes (Google) <[email protected]>
Cc: Paul E. McKenney <[email protected]>
---
io_uring/io_uring.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/io_uring/io_uring.c b/io_uring/io_uring.c
index b521186efa5c..2cb8c665bab1 100644
--- a/io_uring/io_uring.c
+++ b/io_uring/io_uring.c
@@ -538,7 +538,7 @@ static void io_eventfd_signal(struct io_ring_ctx *ctx)
} else {
atomic_inc(&ev_fd->refs);
if (!atomic_fetch_or(BIT(IO_EVENTFD_OP_SIGNAL_BIT), &ev_fd->ops))
- call_rcu(&ev_fd->rcu, io_eventfd_ops);
+ call_rcu_hurry(&ev_fd->rcu, io_eventfd_ops);
else
atomic_dec(&ev_fd->refs);
}
base-commit: 041fae9c105ae342a4245cf1e0dc56a23fbb9d3c
--
2.30.2
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] io_uring: use call_rcu_hurry if signaling an eventfd
2022-12-15 18:41 [PATCH] io_uring: use call_rcu_hurry if signaling an eventfd Dylan Yudaken
@ 2022-12-15 18:44 ` Paul E. McKenney
2022-12-15 18:49 ` Jens Axboe
1 sibling, 0 replies; 4+ messages in thread
From: Paul E. McKenney @ 2022-12-15 18:44 UTC (permalink / raw)
To: Dylan Yudaken
Cc: Jens Axboe, Pavel Begunkov, io-uring, linux-kernel, kernel-team,
Joel Fernandes
On Thu, Dec 15, 2022 at 10:41:38AM -0800, Dylan Yudaken wrote:
> io_uring uses call_rcu in the case it needs to signal an eventfd as a
> result of an eventfd signal, since recursing eventfd signals are not
> allowed. This should be calling the new call_rcu_hurry API to not delay
> the signal.
>
> Signed-off-by: Dylan Yudaken <[email protected]>
>
> Cc: Joel Fernandes (Google) <[email protected]>
> Cc: Paul E. McKenney <[email protected]>
Looks good!
Acked-by: Paul E. McKenney <[email protected]>
> ---
> io_uring/io_uring.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/io_uring/io_uring.c b/io_uring/io_uring.c
> index b521186efa5c..2cb8c665bab1 100644
> --- a/io_uring/io_uring.c
> +++ b/io_uring/io_uring.c
> @@ -538,7 +538,7 @@ static void io_eventfd_signal(struct io_ring_ctx *ctx)
> } else {
> atomic_inc(&ev_fd->refs);
> if (!atomic_fetch_or(BIT(IO_EVENTFD_OP_SIGNAL_BIT), &ev_fd->ops))
> - call_rcu(&ev_fd->rcu, io_eventfd_ops);
> + call_rcu_hurry(&ev_fd->rcu, io_eventfd_ops);
> else
> atomic_dec(&ev_fd->refs);
> }
>
> base-commit: 041fae9c105ae342a4245cf1e0dc56a23fbb9d3c
> --
> 2.30.2
>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] io_uring: use call_rcu_hurry if signaling an eventfd
2022-12-15 18:41 [PATCH] io_uring: use call_rcu_hurry if signaling an eventfd Dylan Yudaken
2022-12-15 18:44 ` Paul E. McKenney
@ 2022-12-15 18:49 ` Jens Axboe
2022-12-15 18:51 ` Joel Fernandes
1 sibling, 1 reply; 4+ messages in thread
From: Jens Axboe @ 2022-12-15 18:49 UTC (permalink / raw)
To: Pavel Begunkov, Dylan Yudaken
Cc: io-uring, linux-kernel, kernel-team, Joel Fernandes,
Paul E . McKenney
On Thu, 15 Dec 2022 10:41:38 -0800, Dylan Yudaken wrote:
> io_uring uses call_rcu in the case it needs to signal an eventfd as a
> result of an eventfd signal, since recursing eventfd signals are not
> allowed. This should be calling the new call_rcu_hurry API to not delay
> the signal.
>
> Signed-off-by: Dylan Yudaken <[email protected]>
>
> [...]
Applied, thanks!
[1/1] io_uring: use call_rcu_hurry if signaling an eventfd
commit: de8f0209fe8064172a86a61537a7b21d6e5334ad
Best regards,
--
Jens Axboe
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] io_uring: use call_rcu_hurry if signaling an eventfd
2022-12-15 18:49 ` Jens Axboe
@ 2022-12-15 18:51 ` Joel Fernandes
0 siblings, 0 replies; 4+ messages in thread
From: Joel Fernandes @ 2022-12-15 18:51 UTC (permalink / raw)
To: Jens Axboe
Cc: Pavel Begunkov, Dylan Yudaken, io-uring, linux-kernel,
kernel-team, Paul E . McKenney
On Thu, Dec 15, 2022 at 1:49 PM Jens Axboe <[email protected]> wrote:
>
>
> On Thu, 15 Dec 2022 10:41:38 -0800, Dylan Yudaken wrote:
> > io_uring uses call_rcu in the case it needs to signal an eventfd as a
> > result of an eventfd signal, since recursing eventfd signals are not
> > allowed. This should be calling the new call_rcu_hurry API to not delay
> > the signal.
> >
> > Signed-off-by: Dylan Yudaken <[email protected]>
> >
> > [...]
>
> Applied, thanks!
>
> [1/1] io_uring: use call_rcu_hurry if signaling an eventfd
> commit: de8f0209fe8064172a86a61537a7b21d6e5334ad
Reviewed-by: Joel Fernandes (Google) <[email protected]>
thanks,
- Joel
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2022-12-15 18:52 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-12-15 18:41 [PATCH] io_uring: use call_rcu_hurry if signaling an eventfd Dylan Yudaken
2022-12-15 18:44 ` Paul E. McKenney
2022-12-15 18:49 ` Jens Axboe
2022-12-15 18:51 ` Joel Fernandes
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox