diff options
author | Pavel Begunkov <asml.silence@gmail.com> | 2021-03-01 19:20:48 +0100 |
---|---|---|
committer | Jens Axboe <axboe@kernel.dk> | 2021-03-04 14:38:07 +0100 |
commit | b23fcf477f85164f3b33b2e8c2c99b2ec61ba902 (patch) | |
tree | 8bed3631b5f30df8b4782296132e06c820a97494 /fs | |
parent | io_uring: inline __io_queue_async_work() (diff) | |
download | linux-b23fcf477f85164f3b33b2e8c2c99b2ec61ba902.tar.xz linux-b23fcf477f85164f3b33b2e8c2c99b2ec61ba902.zip |
io_uring: remove extra in_idle wake up
io_dismantle_req() is always followed by io_put_task(), which already do
proper in_idle wake ups, so we can skip waking the owner task in
io_dismantle_req(). The rules are simpler now, do io_put_task() shortly
after ending a request, and it will be fine.
Signed-off-by: Pavel Begunkov <asml.silence@gmail.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'fs')
-rw-r--r-- | fs/io_uring.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/fs/io_uring.c b/fs/io_uring.c index 840b73db9c3d..26e83cabf3bf 100644 --- a/fs/io_uring.c +++ b/fs/io_uring.c @@ -1649,18 +1649,16 @@ static void io_dismantle_req(struct io_kiocb *req) if (req->flags & REQ_F_INFLIGHT) { struct io_ring_ctx *ctx = req->ctx; - struct io_uring_task *tctx = req->task->io_uring; unsigned long flags; spin_lock_irqsave(&ctx->inflight_lock, flags); list_del(&req->inflight_entry); spin_unlock_irqrestore(&ctx->inflight_lock, flags); req->flags &= ~REQ_F_INFLIGHT; - if (atomic_read(&tctx->in_idle)) - wake_up(&tctx->wait); } } +/* must to be called somewhat shortly after putting a request */ static inline void io_put_task(struct task_struct *task, int nr) { struct io_uring_task *tctx = task->io_uring; |