]> Gentwo Git Trees - linux/.git/commit
block: use {alloc|free}_sched data methods
authorNilay Shroff <nilay@linux.ibm.com>
Thu, 13 Nov 2025 08:58:21 +0000 (14:28 +0530)
committerJens Axboe <axboe@kernel.dk>
Thu, 13 Nov 2025 16:27:49 +0000 (09:27 -0700)
commit0315476e78c050048e80f66334a310e5581b46bb
tree781f5abaec739d4cd7360c5be611f708e1f203c7
parent61019afdf6ac17c8e8f9c42665aa1fa82f04a3e2
block: use {alloc|free}_sched data methods

The previous patch introduced ->alloc_sched_data and
->free_sched_data methods. This patch builds upon that
by now using these methods during elevator switch and
nr_hw_queue update.

It's also ensured that scheduler-specific data is
allocated and freed through the new callbacks outside
of the ->freeze_lock and ->elevator_lock locking contexts,
thereby preventing any dependency on pcpu_alloc_mutex.

Reviewed-by: Ming Lei <ming.lei@redhat.com>
Reviewed-by: Yu Kuai <yukuai@fnnas.com>
Signed-off-by: Nilay Shroff <nilay@linux.ibm.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
block/blk-mq-sched.c
block/blk-mq-sched.h
block/elevator.c
block/elevator.h