diff options
| author | Nilay Shroff <nilay@linux.ibm.com> | 2025-11-13 14:28:21 +0530 |
|---|---|---|
| committer | Jens Axboe <axboe@kernel.dk> | 2025-11-13 09:27:49 -0700 |
| commit | 0315476e78c050048e80f66334a310e5581b46bb (patch) | |
| tree | 781f5abaec739d4cd7360c5be611f708e1f203c7 /block/blk-mq-sched.h | |
| parent | 61019afdf6ac17c8e8f9c42665aa1fa82f04a3e2 (diff) | |
| download | linux-stable-0315476e78c050048e80f66334a310e5581b46bb.tar.gz linux-stable-0315476e78c050048e80f66334a310e5581b46bb.zip | |
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>
Diffstat (limited to 'block/blk-mq-sched.h')
| -rw-r--r-- | block/blk-mq-sched.h | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/block/blk-mq-sched.h b/block/blk-mq-sched.h index 4e1b86e85a8a..02c40a72e959 100644 --- a/block/blk-mq-sched.h +++ b/block/blk-mq-sched.h @@ -26,7 +26,9 @@ void blk_mq_sched_free_rqs(struct request_queue *q); struct elevator_tags *blk_mq_alloc_sched_tags(struct blk_mq_tag_set *set, unsigned int nr_hw_queues, unsigned int nr_requests); int blk_mq_alloc_sched_res(struct request_queue *q, - struct elevator_resources *res, unsigned int nr_hw_queues); + struct elevator_type *type, + struct elevator_resources *res, + unsigned int nr_hw_queues); int blk_mq_alloc_sched_res_batch(struct xarray *elv_tbl, struct blk_mq_tag_set *set, unsigned int nr_hw_queues); int blk_mq_alloc_sched_ctx_batch(struct xarray *elv_tbl, @@ -35,6 +37,7 @@ void blk_mq_free_sched_ctx_batch(struct xarray *elv_tbl); void blk_mq_free_sched_tags(struct elevator_tags *et, struct blk_mq_tag_set *set); void blk_mq_free_sched_res(struct elevator_resources *res, + struct elevator_type *type, struct blk_mq_tag_set *set); void blk_mq_free_sched_res_batch(struct xarray *et_table, struct blk_mq_tag_set *set); |
