linux-block.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v5 00/13] blk-mq: fix possible deadlocks
@ 2025-12-14 10:13 Yu Kuai
  2025-12-14 10:13 ` [PATCH v5 01/13] blk-wbt: factor out a helper wbt_set_lat() Yu Kuai
                   ` (12 more replies)
  0 siblings, 13 replies; 27+ messages in thread
From: Yu Kuai @ 2025-12-14 10:13 UTC (permalink / raw)
  To: axboe, linux-block, tj, nilay, ming.lei; +Cc: yukuai

changes in v5:
 - free rwb from wbt_init() caller in patch 2;
 - don't recheck rwb in patch 2 to make code cleaner, concurrent callers
   will fail from rq_qos_add();
 - add patch 7 to fix possible deadlock in blk-throtle;
changes in v4:
 - add patch 1,2 to fix a new deadlock;
changes in v3:
 - remove changes for blk-iolatency and blk-iocost in patch 2, since
   they don't have debugfs entries.
 - add patch 9 to fix lock order for blk-throttle.
changes in v2:
 - combine two set into one;

Fix deadlock:
 - patch 1-2, pcpu_alloc_mutex under q_usage_counter;
 - patch 3-6, debugfs_mutex under q_usage_counter;
 - patch 7, fs_reclaim under q_usage_counter;
 - patch 8-13, q_usage_counter under rq_qos_mutex;

Yu Kuai (13):
  blk-wbt: factor out a helper wbt_set_lat()
  blk-wbt: fix possible deadlock to nest pcpu_alloc_mutex under
    q_usage_counter
  blk-mq-debugfs: factor out a helper to register debugfs for all rq_qos
  blk-rq-qos: fix possible debugfs_mutex deadlock
  blk-mq-debugfs: make blk_mq_debugfs_register_rqos() static
  blk-mq-debugfs: warn about possible deadlock
  blk-throttle: convert to GFP_NOIO in blk_throtl_init()
  block/blk-rq-qos: add a new helper rq_qos_add_frozen()
  blk-wbt: fix incorrect lock order for rq_qos_mutex and freeze queue
  blk-iocost: fix incorrect lock order for rq_qos_mutex and freeze queue
  blk-iolatency: fix incorrect lock order for rq_qos_mutex and freeze
    queue
  blk-throttle: remove useless queue frozen
  block/blk-rq-qos: cleanup rq_qos_add()

 block/blk-iocost.c     |  15 ++--
 block/blk-iolatency.c  |  11 +--
 block/blk-mq-debugfs.c |  57 +++++++++++-----
 block/blk-mq-debugfs.h |   4 +-
 block/blk-rq-qos.c     |  27 ++------
 block/blk-sysfs.c      |  39 +----------
 block/blk-throttle.c   |  13 +---
 block/blk-throttle.h   |   3 +-
 block/blk-wbt.c        | 151 ++++++++++++++++++++++++++++++-----------
 block/blk-wbt.h        |   8 +--
 10 files changed, 184 insertions(+), 144 deletions(-)

-- 
2.51.0


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

end of thread, other threads:[~2025-12-25  9:44 UTC | newest]

Thread overview: 27+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-12-14 10:13 [PATCH v5 00/13] blk-mq: fix possible deadlocks Yu Kuai
2025-12-14 10:13 ` [PATCH v5 01/13] blk-wbt: factor out a helper wbt_set_lat() Yu Kuai
2025-12-16 10:19   ` Ming Lei
2025-12-18 14:18   ` Nilay Shroff
2025-12-14 10:13 ` [PATCH v5 02/13] blk-wbt: fix possible deadlock to nest pcpu_alloc_mutex under q_usage_counter Yu Kuai
2025-12-16 11:03   ` Ming Lei
2025-12-16 11:29     ` Yu Kuai
2025-12-18 14:20   ` Nilay Shroff
2025-12-14 10:13 ` [PATCH v5 03/13] blk-mq-debugfs: factor out a helper to register debugfs for all rq_qos Yu Kuai
2025-12-18 11:06   ` Ming Lei
2025-12-18 14:28   ` Nilay Shroff
2025-12-14 10:13 ` [PATCH v5 04/13] blk-rq-qos: fix possible debugfs_mutex deadlock Yu Kuai
2025-12-18 11:11   ` Ming Lei
2025-12-18 14:33   ` Nilay Shroff
2025-12-14 10:14 ` [PATCH v5 05/13] blk-mq-debugfs: make blk_mq_debugfs_register_rqos() static Yu Kuai
2025-12-18 14:52   ` Nilay Shroff
2025-12-25  9:30     ` Yu Kuai
2025-12-14 10:14 ` [PATCH v5 06/13] blk-mq-debugfs: warn about possible deadlock Yu Kuai
2025-12-18 18:26   ` Nilay Shroff
2025-12-25  9:37     ` Yu Kuai
2025-12-14 10:14 ` [PATCH v5 07/13] blk-throttle: convert to GFP_NOIO in blk_throtl_init() Yu Kuai
2025-12-14 10:14 ` [PATCH v5 08/13] block/blk-rq-qos: add a new helper rq_qos_add_frozen() Yu Kuai
2025-12-14 10:14 ` [PATCH v5 09/13] blk-wbt: fix incorrect lock order for rq_qos_mutex and freeze queue Yu Kuai
2025-12-14 10:14 ` [PATCH v5 10/13] blk-iocost: " Yu Kuai
2025-12-14 10:14 ` [PATCH v5 11/13] blk-iolatency: " Yu Kuai
2025-12-14 10:14 ` [PATCH v5 12/13] blk-throttle: remove useless queue frozen Yu Kuai
2025-12-14 10:14 ` [PATCH v5 13/13] block/blk-rq-qos: cleanup rq_qos_add() Yu Kuai

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).