]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
blk-ioc: don't hold queue_lock for ioc_lookup_icq()
authorYu Kuai <yukuai3@huawei.com>
Tue, 29 Jul 2025 02:32:29 +0000 (10:32 +0800)
committerJens Axboe <axboe@kernel.dk>
Tue, 29 Jul 2025 12:26:34 +0000 (06:26 -0600)
commit5421681bc3ef13476bd9443379cd69381e8760fa
treec93edc86cba65073358ef647a77b8066cb820786
parent1da67b5b1754713b8ea0c3dd847e04790cffd91f
blk-ioc: don't hold queue_lock for ioc_lookup_icq()

Currently issue io can grab queue_lock three times from bfq_bio_merge(),
bfq_limit_depth() and bfq_prepare_request(), the queue_lock is not
necessary if icq is already created because both queue and ioc can't be
freed before io issuing is done, hence remove the unnecessary queue_lock
and use rcu to protect radix tree lookup.

Noted this is also a prep patch to support request batch dispatching[1].

[1] https://lore.kernel.org/all/20250722072431.610354-1-yukuai1@huaweicloud.com/

Signed-off-by: Yu Kuai <yukuai3@huawei.com>
Reviewed-by: Damien Le Moal <dlemoal@kernel.org>
Reviewed-by: Jan Kara <jack@suse.cz>
Link: https://lore.kernel.org/r/20250729023229.2944898-1-yukuai1@huaweicloud.com
Signed-off-by: Jens Axboe <axboe@kernel.dk>
block/bfq-iosched.c
block/blk-ioc.c