Thread (30 messages) 30 messages, 3 authors, 2025-08-07

Re: [PATCH 1/5] blk-mq: Move flush queue allocation into blk_mq_init_hctx()

From: Hannes Reinecke <hare@suse.de>
Date: 2025-08-04 07:07:15

On 8/1/25 13:44, Ming Lei wrote:
Move flush queue allocation into blk_mq_init_hctx() and its release into
blk_mq_exit_hctx(), and prepare for replacing tags->lock with SRCU to
draining inflight request walking. blk_mq_exit_hctx() is the last chance
for us to get valid `tag_set` reference, and we need to add one SRCU to
`tag_set` for freeing flush request via call_srcu().

It is safe to move flush queue & request release into blk_mq_exit_hctx(),
because blk_mq_clear_flush_rq_mapping() clears the flush request
reference int driver tags inflight request table, meantime inflight
request walking is drained.

Signed-off-by: Ming Lei <redacted>
---
  block/blk-mq-sysfs.c |  1 -
  block/blk-mq.c       | 20 +++++++++++++-------
  2 files changed, 13 insertions(+), 8 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