lkml.org 
[lkml]   [2020]   [Nov]   [9]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[PATCH 5.9 078/133] io_uring: dont miss setting IO_WQ_WORK_CONCURRENT
    Date
    From: Pavel Begunkov <asml.silence@gmail.com>

    [ Upstream commit feaadc4fc2ebdbd53ffed1735077725855a2af53 ]

    Set IO_WQ_WORK_CONCURRENT for all REQ_F_FORCE_ASYNC requests, do that in
    that is also looks better.

    Signed-off-by: Pavel Begunkov <asml.silence@gmail.com>
    Signed-off-by: Jens Axboe <axboe@kernel.dk>
    Signed-off-by: Sasha Levin <sashal@kernel.org>
    ---
    fs/io_uring.c | 10 +++-------
    1 file changed, 3 insertions(+), 7 deletions(-)

    diff --git a/fs/io_uring.c b/fs/io_uring.c
    index 64f214a3dc9dd..eba5f65493a10 100644
    --- a/fs/io_uring.c
    +++ b/fs/io_uring.c
    @@ -1140,6 +1140,9 @@ static void io_prep_async_work(struct io_kiocb *req)

    io_req_init_async(req);

    + if (req->flags & REQ_F_FORCE_ASYNC)
    + req->work.flags |= IO_WQ_WORK_CONCURRENT;
    +
    if (req->flags & REQ_F_ISREG) {
    if (def->hash_reg_file || (req->ctx->flags & IORING_SETUP_IOPOLL))
    io_wq_hash_work(&req->work, file_inode(req->file));
    @@ -6281,13 +6284,6 @@ static void io_queue_sqe(struct io_kiocb *req, const struct io_uring_sqe *sqe,
    if (unlikely(ret))
    goto fail_req;
    }
    -
    - /*
    - * Never try inline submit of IOSQE_ASYNC is set, go straight
    - * to async execution.
    - */
    - io_req_init_async(req);
    - req->work.flags |= IO_WQ_WORK_CONCURRENT;
    io_queue_async_work(req);
    } else {
    __io_queue_sqe(req, sqe, cs);
    --
    2.27.0


    \
     
     \ /
      Last update: 2020-11-09 14:25    [W:2.072 / U:0.024 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site