diff options
author | Pavel Begunkov <asml.silence@gmail.com> | 2024-02-07 14:14:29 +0000 |
---|---|---|
committer | Jens Axboe <axboe@kernel.dk> | 2024-02-08 10:18:48 -0700 |
commit | e516c3fc6c182736aec5418a73f15199640491e2 (patch) | |
tree | 10bc35f89a0830ed0f4c288bcb82d253b4f2bb81 /block/blk-core.c | |
parent | c9f5f3aa19c617fe85085b19abbf7a9a077336d0 (diff) |
block: optimise in irq bio put caching
When enlisting a bio into ->free_list_irq we protect the list by
disabling irqs. It's likely they're already disabled and performance of
local_irq_{save,restore}() is decent, but it's not zero cost.
Let's only use the irq cache when when we're serving a hard irq, which
allows to remove local_irq_{save,restore}(), and fall back to bio_free()
in all left cases.
Profiles indicate that the bio_put() cost is reduced by ~3.5 times
(1.76% -> 0.49%), and total throughput of a CPU bound benchmark improve
by around 1% (t/io_uring with high QD and several drives).
Signed-off-by: Pavel Begunkov <asml.silence@gmail.com>
Link: https://lore.kernel.org/r/36d207540b7046c653cc16e5ff08fe7234b19f81.1707314970.git.asml.silence@gmail.com
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'block/blk-core.c')
0 files changed, 0 insertions, 0 deletions