Thread (15 messages) 15 messages, 4 authors, 2025-07-01

Re: [PATCHv6 1/3] block: move elevator queue allocation logic into blk_mq_init_sched

From: Hannes Reinecke <hare@suse.de>
Date: 2025-06-30 06:17:43

On 6/30/25 07:21, Nilay Shroff wrote:
In preparation for allocating sched_tags before freezing the request
queue and acquiring ->elevator_lock, move the elevator queue allocation
logic from the elevator ops ->init_sched callback into blk_mq_init_sched.
As elevator_alloc is now only invoked from block layer core, we don't
need to export it, so unexport elevator_alloc function.

This refactoring provides a centralized location for elevator queue
initialization, which makes it easier to store pre-allocated sched_tags
in the struct elevator_queue during later changes.

Reviewed-by: Ming Lei <redacted>
Signed-off-by: Nilay Shroff <redacted>
---
  block/bfq-iosched.c   | 13 +++----------
  block/blk-mq-sched.c  | 11 ++++++++---
  block/elevator.c      |  1 -
  block/elevator.h      |  2 +-
  block/kyber-iosched.c | 11 ++---------
  block/mq-deadline.c   | 14 ++------------
  6 files changed, 16 insertions(+), 36 deletions(-)
Reviewed-by: Hannes Reinecke <hare@suse.de>

Cheers,

Hannes
-- 
Dr. Hannes Reinecke                  Kernel Storage Architect
hare@suse.de                                +49 911 74053 688
SUSE Software Solutions GmbH, Frankenstr. 146, 90461 Nürnberg
HRB 36809 (AG Nürnberg), GF: I. Totev, A. McDonald, W. Knoblich
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help