]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
block: introduce alloc_sched_data and free_sched_data elevator methods
authorNilay Shroff <nilay@linux.ibm.com>
Thu, 13 Nov 2025 08:58:20 +0000 (14:28 +0530)
committerJens Axboe <axboe@kernel.dk>
Thu, 13 Nov 2025 16:27:49 +0000 (09:27 -0700)
commit61019afdf6ac17c8e8f9c42665aa1fa82f04a3e2
tree0566604c928d0ae170c07d319ea0794c6005320d
parent04728ce90966c54417fd8120a3820104d18ba68d
block: introduce alloc_sched_data and free_sched_data elevator methods

The recent lockdep splat [1] highlights a potential deadlock risk
involving ->elevator_lock and ->freeze_lock dependencies on -pcpu_alloc_
mutex. The trace shows that the issue occurs when the Kyber scheduler
allocates dynamic memory for its elevator data during initialization.

To address this, introduce two new elevator operation callbacks:
->alloc_sched_data and ->free_sched_data. The subsequent patch would
build upon these newly introduced methods to suppress lockdep splat[1].

[1] https://lore.kernel.org/all/CAGVVp+VNW4M-5DZMNoADp6o2VKFhi7KxWpTDkcnVyjO0=-D5+A@mail.gmail.com/

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