io_uring: optimise tctx node checks/alloc
authorPavel Begunkov <asml.silence@gmail.com>
Fri, 19 Mar 2021 17:22:31 +0000 (17:22 +0000)
committerJens Axboe <axboe@kernel.dk>
Sun, 4 Apr 2021 21:27:21 +0000 (15:27 -0600)
commiteace6e7544f0ba3e9a1e3ace024bca0d039e96f3
tree591f4d7b927db4d50131bd13fd6e1310d93f8f82
parentd5a4c7217d8f3c70b931fbaebb5cf73065d703a2
io_uring: optimise tctx node checks/alloc

First of all, w need to set tctx->sqpoll only when we add a new entry
into ->xa, so move it from the hot path. Also extract a hot path for
io_uring_add_task_file() as an inline helper.

Signed-off-by: Pavel Begunkov <asml.silence@gmail.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
fs/io_uring.c