Skip to contentSkip to conversation

io_uring: use call_rcu_hurry if signaling an eventfd

PATCH Applied Dylan Yudaken 4 participants 4 messages Dec 15, 2022 io_uring

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 io_uring: use call_rcu_hurry if signaling an eventfd

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.

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(-)
io_uring/io_uring.c +1 -1
index b521186efa5c..2cb8c665bab1 100644
@@ -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

Signature · 1 line
2.30.2
Acked-by on v1 1/1
#1 lore raw
Quoted 9 lines · Dylan Yudaken

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.

Cc Joel Fernandes (Google) <[email protected]>
Cc Paul E. McKenney <[email protected]>

Looks good!

Quoted 22 lines
---
 io_uring/io_uring.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
io_uring/io_uring.c +1 -1
index b521186efa5c..2cb8c665bab1 100644
@@ -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

Signature · 1 line
2.30.2
maintainer Applied
#2 lore raw
In reply to Dylan Yudaken
Quoted 8 lines · Dylan Yudaken

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.

[...]

Applied, thanks!

[1/1] io_uring: use call_rcu_hurry if signaling an eventfd

      commit: de8f0209fe8064172a86a61537a7b21d6e5334ad

Best regards,

Signature · 1 line
Jens Axboe
Reviewed-by
#3 lore raw
Quoted 8 lines · Jens Axboe
Quoted 5 lines · Dylan Yudaken

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.

Quoted 8 lines
Quoted 3 lines

[...]

Applied, thanks!

[1/1] io_uring: use call_rcu_hurry if signaling an eventfd

      commit: de8f0209fe8064172a86a61537a7b21d6e5334ad

thanks,

- Joel