[PATCH] io_uring: keep multishot request NAPI timeout fresh

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

 



this refresh statement was originally present in the original patch:
https://lore.kernel.org/netdev/20221121191437.996297-2-shr@xxxxxxxxxxxx/

it has been removed with no explanation in v6:
https://lore.kernel.org/netdev/20230201222254.744422-2-shr@xxxxxxxxxxxx/

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 <olivier@xxxxxxxxxxxxxx>
---
 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





[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