io_uring/cmd: add cmd lazy tw wake helper
authorPavel Begunkov <asml.silence@gmail.com>
Mon, 15 May 2023 12:54:42 +0000 (13:54 +0100)
committerJens Axboe <axboe@kernel.dk>
Thu, 25 May 2023 14:54:06 +0000 (08:54 -0600)
commit5f3139fc46993b2d653a7aa5cdfe66a91881fd06
tree7f664fef32217a0278866e3fbdb304891a66b5a1
parent5498bf28d8f2bd63a46ad40f4427518615fb793f
io_uring/cmd: add cmd lazy tw wake helper

We want to use IOU_F_TWQ_LAZY_WAKE in commands. First, introduce a new
cmd tw helper accepting TWQ flags, and then add
io_uring_cmd_do_in_task_laz() that will pass IOU_F_TWQ_LAZY_WAKE and
imply the "lazy" semantics, i.e. it posts no more than 1 CQE and
delaying execution of this tw should not prevent forward progress.

Signed-off-by: Pavel Begunkov <asml.silence@gmail.com>
Link: https://lore.kernel.org/r/5b9f6716006df7e817f18bd555aee2f8f9c8b0c3.1684154817.git.asml.silence@gmail.com
Signed-off-by: Jens Axboe <axboe@kernel.dk>
include/linux/io_uring.h
io_uring/uring_cmd.c