public inbox for [email protected]
 help / color / mirror / Atom feed
* [PATCH] io_uring: keep multishot request NAPI timeout fresh
@ 2024-07-29 23:03 Olivier Langlois
  2024-07-30 11:08 ` Pavel Begunkov
  2024-07-30 12:20 ` Jens Axboe
  0 siblings, 2 replies; 3+ messages in thread
From: Olivier Langlois @ 2024-07-29 23:03 UTC (permalink / raw)
  To: Jens Axboe, Pavel Begunkov, io-uring

this refresh statement was originally present in the original patch:
https://lore.kernel.org/netdev/[email protected]/

it has been removed with no explanation in v6:
https://lore.kernel.org/netdev/[email protected]/

it is important to make the refresh for multishot request because if no
new requests using the same NAPI device are added to the ring, the entry
will become stall and be removed silently and the unsuspecting user will
not know that his ring made busy polling for only 60 seconds.

Signed-off-by: Olivier Langlois <[email protected]>
---
 io_uring/poll.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/io_uring/poll.c b/io_uring/poll.c
index 0a8e02944689..1f63b60e85e7 100644
--- a/io_uring/poll.c
+++ b/io_uring/poll.c
@@ -347,6 +347,7 @@ static int io_poll_check_events(struct io_kiocb *req, struct io_tw_state *ts)
 		v &= IO_POLL_REF_MASK;
 	} while (atomic_sub_return(v, &req->poll_refs) & IO_POLL_REF_MASK);
 
+	io_napi_add(req);
 	return IOU_POLL_NO_ACTION;
 }
 
-- 
2.45.2


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] io_uring: keep multishot request NAPI timeout fresh
  2024-07-29 23:03 [PATCH] io_uring: keep multishot request NAPI timeout fresh Olivier Langlois
@ 2024-07-30 11:08 ` Pavel Begunkov
  2024-07-30 12:20 ` Jens Axboe
  1 sibling, 0 replies; 3+ messages in thread
From: Pavel Begunkov @ 2024-07-30 11:08 UTC (permalink / raw)
  To: Olivier Langlois, Jens Axboe, io-uring

On 7/30/24 00:03, Olivier Langlois wrote:
> this refresh statement was originally present in the original patch:
> https://lore.kernel.org/netdev/[email protected]/
> 
> it has been removed with no explanation in v6:
> https://lore.kernel.org/netdev/[email protected]/
> 
> it is important to make the refresh for multishot request because if no
> new requests using the same NAPI device are added to the ring, the entry
> will become stall and be removed silently and the unsuspecting user will
> not know that his ring made busy polling for only 60 seconds.

we probably need a new update helper in the future, but good
enough for now.

Reviewed-by: Pavel Begunkov <[email protected]>

Should also have:

Fixes: 8d0c12a80cdeb ("io-uring: add napi busy poll support")
Cc: [email protected]


> Signed-off-by: Olivier Langlois <[email protected]>
> ---
>   io_uring/poll.c | 1 +
>   1 file changed, 1 insertion(+)
> 
> diff --git a/io_uring/poll.c b/io_uring/poll.c
> index 0a8e02944689..1f63b60e85e7 100644
> --- a/io_uring/poll.c
> +++ b/io_uring/poll.c
> @@ -347,6 +347,7 @@ static int io_poll_check_events(struct io_kiocb *req, struct io_tw_state *ts)
>   		v &= IO_POLL_REF_MASK;
>   	} while (atomic_sub_return(v, &req->poll_refs) & IO_POLL_REF_MASK);
>   
> +	io_napi_add(req);
>   	return IOU_POLL_NO_ACTION;
>   }
>   

-- 
Pavel Begunkov

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] io_uring: keep multishot request NAPI timeout fresh
  2024-07-29 23:03 [PATCH] io_uring: keep multishot request NAPI timeout fresh Olivier Langlois
  2024-07-30 11:08 ` Pavel Begunkov
@ 2024-07-30 12:20 ` Jens Axboe
  1 sibling, 0 replies; 3+ messages in thread
From: Jens Axboe @ 2024-07-30 12:20 UTC (permalink / raw)
  To: Pavel Begunkov, io-uring, Olivier Langlois


On Mon, 29 Jul 2024 19:03:33 -0400, Olivier Langlois wrote:
> this refresh statement was originally present in the original patch:
> https://lore.kernel.org/netdev/[email protected]/
> 
> it has been removed with no explanation in v6:
> https://lore.kernel.org/netdev/[email protected]/
> 
> it is important to make the refresh for multishot request because if no
> new requests using the same NAPI device are added to the ring, the entry
> will become stall and be removed silently and the unsuspecting user will
> not know that his ring made busy polling for only 60 seconds.
> 
> [...]

Applied, thanks!

[1/1] io_uring: keep multishot request NAPI timeout fresh
      commit: 2c762be5b798c443612c1bb9b011de4fdaebd1c5

Best regards,
-- 
Jens Axboe




^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2024-07-30 12:20 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-07-29 23:03 [PATCH] io_uring: keep multishot request NAPI timeout fresh Olivier Langlois
2024-07-30 11:08 ` Pavel Begunkov
2024-07-30 12:20 ` Jens Axboe

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox