io_uring: defer flushing cached reqs
authorPavel Begunkov <asml.silence@gmail.com>
Wed, 10 Feb 2021 00:03:23 +0000 (00:03 +0000)
committerJens Axboe <axboe@kernel.dk>
Wed, 10 Feb 2021 14:28:43 +0000 (07:28 -0700)
commite5d1bc0a91f16959aa279aa3ee9fdc246d4bb382
treeda1be612b0d777fa7f9ee84ef880c3a81728f035
parentc5eef2b9449ba267f53bfa7cf63d2bc93acbee32
io_uring: defer flushing cached reqs

Awhile there are requests in the allocation cache -- use them, only if
those ended go for the stashed memory in comp.free_list. As list
manipulation are generally heavy and are not good for caches, flush them
all or as much as can in one go.

Signed-off-by: Pavel Begunkov <asml.silence@gmail.com>
[axboe: return success/failure from io_flush_cached_reqs()]
Signed-off-by: Jens Axboe <axboe@kernel.dk>
fs/io_uring.c