block: extend bio caching to task context
authorPavel Begunkov <asml.silence@gmail.com>
Wed, 7 Feb 2024 14:14:28 +0000 (14:14 +0000)
committerJens Axboe <axboe@kernel.dk>
Thu, 8 Feb 2024 17:18:47 +0000 (10:18 -0700)
commitc9f5f3aa19c617fe85085b19abbf7a9a077336d0
tree52ca30cebabae974e1792ed1c905e410fb417de8
parent79ae56fc475869d636071f66d9e4ef2a3819eee6
block: extend bio caching to task context

bio_put_percpu_cache() puts all non-iopoll bios into the irq-safe list,
which entails disabling irqs. The overhead of that is not that bad when
interrupts are already off but getting worse otherwise. We can optimise
it when we're in the task context by using ->free_list directly just as
the IOPOLL path does.

Signed-off-by: Pavel Begunkov <asml.silence@gmail.com>
Link: https://lore.kernel.org/r/4774e1a0f905f96c63174b0f3e4f79f0d9b63246.1707314970.git.asml.silence@gmail.com
Signed-off-by: Jens Axboe <axboe@kernel.dk>
block/bio.c