io_uring: switch !DRAIN fast path when possible
authorPavel Begunkov <asml.silence@gmail.com>
Tue, 15 Jun 2021 15:47:56 +0000 (16:47 +0100)
committerJens Axboe <axboe@kernel.dk>
Tue, 15 Jun 2021 21:44:33 +0000 (15:44 -0600)
commit10c669040e9b3538e1732c8d40729636b17ce9dd
treefdea8650df3f3cf72e32be4a4dbd3e58cfb6b80c
parent27f6b318dea2d7ccccc9dca416e59431838c2929
io_uring: switch !DRAIN fast path when possible

->drain_used is one way, which is not optimal if users use DRAIN but
very rarely. However, we can just clear it in io_drain_req() when all
drained before requests are gone. Also rename the flag to reflect the
change and be more clear about it.

Signed-off-by: Pavel Begunkov <asml.silence@gmail.com>
Link: https://lore.kernel.org/r/7f37a240857546a94df6348507edddacab150460.1623772051.git.asml.silence@gmail.com
Signed-off-by: Jens Axboe <axboe@kernel.dk>
fs/io_uring.c