io_uring: enable req cache for task_work items
authorJens Axboe <axboe@kernel.dk>
Wed, 10 Feb 2021 00:03:21 +0000 (00:03 +0000)
committerJens Axboe <axboe@kernel.dk>
Wed, 10 Feb 2021 14:28:43 +0000 (07:28 -0700)
commit65453d1efbd20f3825beba2a9c93ffb2ec729ece
tree389d3828515b115544d7129a685284a46727d885
parent7cbf1722d5fc5779946ee8f338e9e38b5de15856
io_uring: enable req cache for task_work items

task_work is run without utilizing the req alloc cache, so any deferred
items don't get to take advantage of either the alloc or free side of it.
With task_work now being wrapped by io_uring, we can use the ctx
completion state to both use the req cache and the completion flush
batching.

With this, the only request type that cannot take advantage of the req
cache is IRQ driven IO for regular files / block devices. Anything else,
including IOPOLL polled IO to those same tyes, will take advantage of it.

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