Skip to content

Commit 2c762be

Browse files
Olivier Langloisaxboe
authored andcommitted
io_uring: keep multishot request NAPI timeout current
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 requests, because if no new requests using the same NAPI device are added to the ring, the entry will become stale and be removed silently. The unsuspecting user will not know that their ring had busy polling for only 60 seconds before being pruned. Signed-off-by: Olivier Langlois <[email protected]> Reviewed-by: Pavel Begunkov <[email protected]> Fixes: 8d0c12a ("io-uring: add napi busy poll support") Cc: [email protected] Link: https://lore.kernel.org/r/0fe61a019ec61e5708cd117cb42ed0dab95e1617.1722294646.git.olivier@trillion01.com Signed-off-by: Jens Axboe <[email protected]>
1 parent 3581696 commit 2c762be

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

io_uring/poll.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -347,6 +347,7 @@ static int io_poll_check_events(struct io_kiocb *req, struct io_tw_state *ts)
347347
v &= IO_POLL_REF_MASK;
348348
} while (atomic_sub_return(v, &req->poll_refs) & IO_POLL_REF_MASK);
349349

350+
io_napi_add(req);
350351
return IOU_POLL_NO_ACTION;
351352
}
352353

0 commit comments

Comments
 (0)