All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH V2 0/5] blk-mq: Replace tags->lock with SRCU for tag iterators
@ 2025-08-30  2:18 Ming Lei
  2025-08-30  2:18 ` [PATCH V2 1/5] blk-mq: Move flush queue allocation into blk_mq_init_hctx() Ming Lei
                   ` (7 more replies)
  0 siblings, 8 replies; 17+ messages in thread
From: Ming Lei @ 2025-08-30  2:18 UTC (permalink / raw)
  To: Jens Axboe, linux-block; +Cc: Hannes Reinecke, Yu Kuai, Ming Lei

Hello Jens,

Replace the spinlock in blk_mq_find_and_get_req() with an SRCU read lock
around the tag iterators.

Avoids scsi_host_busy() lockup during scsi host blocked in case of big cpu
cores & deep queue depth.

Also the big tags lock isn't needed when reading disk sysfs attribute
'inflight' any more.

Take the following approach:

- clearing rq reference in tags->rqs[] and deferring freeing scheduler requests
in SRCU callback

- replace tags->lock with srcu read lock in tags iterator.

V2:
	- rebase on for-6.18/block
	- add review tags


Thanks,
Ming


Ming Lei (5):
  blk-mq: Move flush queue allocation into blk_mq_init_hctx()
  blk-mq: Pass tag_set to blk_mq_free_rq_map/tags
  blk-mq: Defer freeing of tags page_list to SRCU callback
  blk-mq: Defer freeing flush queue to SRCU callback
  blk-mq: Replace tags->lock with SRCU for tag iterators

 block/blk-mq-sysfs.c   |  1 -
 block/blk-mq-tag.c     | 38 +++++++++++++++---
 block/blk-mq.c         | 87 +++++++++++++++++++++---------------------
 block/blk-mq.h         |  4 +-
 block/blk.h            |  1 +
 include/linux/blk-mq.h |  2 +
 6 files changed, 80 insertions(+), 53 deletions(-)

-- 
2.47.0


^ permalink raw reply	[flat|nested] 17+ messages in thread

end of thread, other threads:[~2025-10-06 23:03 UTC | newest]

Thread overview: 17+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-08-30  2:18 [PATCH V2 0/5] blk-mq: Replace tags->lock with SRCU for tag iterators Ming Lei
2025-08-30  2:18 ` [PATCH V2 1/5] blk-mq: Move flush queue allocation into blk_mq_init_hctx() Ming Lei
2025-08-30  2:18 ` [PATCH V2 2/5] blk-mq: Pass tag_set to blk_mq_free_rq_map/tags Ming Lei
2025-08-30  2:18 ` [PATCH V2 3/5] blk-mq: Defer freeing of tags page_list to SRCU callback Ming Lei
2025-08-30  2:18 ` [PATCH V2 4/5] blk-mq: Defer freeing flush queue " Ming Lei
2025-08-30  2:18 ` [PATCH V2 5/5] blk-mq: Replace tags->lock with SRCU for tag iterators Ming Lei
2025-10-03 17:17   ` [PATCH V2 5/5] blk-mq: Replace tags->lock with SRCU for tag iterators - Rockchip UFS regression Sebastian Reichel
2025-10-03 17:17     ` Sebastian Reichel
2025-10-04 14:42     ` Ming Lei
2025-10-04 14:42       ` Ming Lei
2025-10-06 18:02       ` Bart Van Assche
2025-10-06 18:02         ` Bart Van Assche
2025-10-06 23:03         ` Jens Axboe
2025-10-06 23:03           ` Jens Axboe
2025-08-31  0:35 ` [PATCH V2 0/5] blk-mq: Replace tags->lock with SRCU for tag iterators Martin K. Petersen
2025-09-08  1:28 ` Ming Lei
2025-09-08 14:07 ` Jens Axboe

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.