Skip to content

Commit

Permalink
io_uring: kill poll linking optimisation
Browse files Browse the repository at this point in the history
With IORING_FEAT_FAST_POLL in place, io_put_req_find_next() for poll
requests doesn't make much sense, and in any case re-adding it
shouldn't be a problem considering batching in tctx_task_work(). We can
remove it.

Signed-off-by: Pavel Begunkov <asml.silence@gmail.com>
Link: https://lore.kernel.org/r/15699682bf81610ec901d4e79d6da64baa9f70be.1639605189.git.asml.silence@gmail.com
Signed-off-by: Jens Axboe <axboe@kernel.dk>
  • Loading branch information
Pavel Begunkov authored and Jens Axboe committed Dec 28, 2021
1 parent 5641897 commit ab1dab9
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions fs/io_uring.c
Original file line number Diff line number Diff line change
Expand Up @@ -5485,7 +5485,6 @@ static bool __io_poll_complete(struct io_kiocb *req, __poll_t mask)
static void io_poll_task_func(struct io_kiocb *req, bool *locked)
{
struct io_ring_ctx *ctx = req->ctx;
struct io_kiocb *nxt;

if (io_poll_rewait(req, &req->poll)) {
spin_unlock(&ctx->completion_lock);
Expand All @@ -5509,11 +5508,8 @@ static void io_poll_task_func(struct io_kiocb *req, bool *locked)
spin_unlock(&ctx->completion_lock);
io_cqring_ev_posted(ctx);

if (done) {
nxt = io_put_req_find_next(req);
if (nxt)
io_req_task_submit(nxt, locked);
}
if (done)
io_put_req(req);
}
}

Expand Down

0 comments on commit ab1dab9

Please sign in to comment.