public inbox for linux-block@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH v7 00/16] blk-mq: fix possible deadlocks
@ 2025-12-31  8:51 Yu Kuai
  2025-12-31  8:51 ` [PATCH v7 01/16] blk-wbt: factor out a helper wbt_set_lat() Yu Kuai
                   ` (15 more replies)
  0 siblings, 16 replies; 45+ messages in thread
From: Yu Kuai @ 2025-12-31  8:51 UTC (permalink / raw)
  To: axboe, linux-block, tj, nilay, ming.lei; +Cc: yukuai

changes in v7:
 - add patch 7 to fix missing debugfs_mutex for hctxs' debugfs;
 - add patch 15,16 to cleanup unnecessary queue frozen;
changes in v6:
 - rebase on the top of block-6.19;
 - add patch 6 to cleanup  blk_mq_debugfs_unregister_rqos();
 - change patch 8, from GFP_NOIO to blkg_conf_open_bdev_frozen();
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 deadlocks:
 - patch 1-2, pcpu_alloc_mutex under q_usage_counter in blk-wbt;
 - patch 3-8, debugfs_mutex under q_usage_counter;
 - patch 9, fs_reclaim under rq_qos_mutex in blk-throttle;
 - patch 10-14, q_usage_counter under rq_qos_mutex;

Yu Kuai (16):
  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: remove blk_mq_debugfs_unregister_rqos()
  blk-mq-debugfs: add missing debugfs_mutex in
    blk_mq_debugfs_register_hctxs()
  blk-mq-debugfs: warn about possible deadlock
  blk-throttle: fix possible deadlock for fs reclaim under rq_qos_mutex
  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
  block/blk-rq-qos: cleanup rq_qos_add()
  blk-rq-qos: remove queue frozen from rq_qos_del()
  blk-cgroup: remove queue frozen from blkcg_activate_policy()

 block/blk-cgroup.c     |   7 +-
 block/blk-iocost.c     |  15 ++--
 block/blk-iolatency.c  |  11 +--
 block/blk-mq-debugfs.c |  68 +++++++++++-------
 block/blk-mq-debugfs.h |   8 +--
 block/blk-rq-qos.c     |  35 ++--------
 block/blk-sysfs.c      |  39 +----------
 block/blk-throttle.c   |  27 ++++----
 block/blk-wbt.c        | 153 +++++++++++++++++++++++++++++++----------
 block/blk-wbt.h        |   7 +-
 10 files changed, 199 insertions(+), 171 deletions(-)

-- 
2.51.0


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

end of thread, other threads:[~2026-02-11  2:07 UTC | newest]

Thread overview: 45+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-12-31  8:51 [PATCH v7 00/16] blk-mq: fix possible deadlocks Yu Kuai
2025-12-31  8:51 ` [PATCH v7 01/16] blk-wbt: factor out a helper wbt_set_lat() Yu Kuai
2025-12-31  8:51 ` [PATCH v7 02/16] blk-wbt: fix possible deadlock to nest pcpu_alloc_mutex under q_usage_counter Yu Kuai
2026-01-07  9:30   ` Ming Lei
2025-12-31  8:51 ` [PATCH v7 03/16] blk-mq-debugfs: factor out a helper to register debugfs for all rq_qos Yu Kuai
2025-12-31  8:51 ` [PATCH v7 04/16] blk-rq-qos: fix possible debugfs_mutex deadlock Yu Kuai
2026-01-07  9:41   ` Ming Lei
2025-12-31  8:51 ` [PATCH v7 05/16] blk-mq-debugfs: make blk_mq_debugfs_register_rqos() static Yu Kuai
2026-01-07  9:42   ` Ming Lei
2025-12-31  8:51 ` [PATCH v7 06/16] blk-mq-debugfs: remove blk_mq_debugfs_unregister_rqos() Yu Kuai
2026-01-04 16:37   ` Nilay Shroff
2026-01-07  9:48   ` Ming Lei
2025-12-31  8:51 ` [PATCH v7 07/16] blk-mq-debugfs: add missing debugfs_mutex in blk_mq_debugfs_register_hctxs() Yu Kuai
2026-01-04 16:37   ` Nilay Shroff
2026-01-07  9:51   ` Ming Lei
2025-12-31  8:51 ` [PATCH v7 08/16] blk-mq-debugfs: warn about possible deadlock Yu Kuai
2026-01-04 16:38   ` Nilay Shroff
2026-01-07  9:56   ` Ming Lei
2025-12-31  8:51 ` [PATCH v7 09/16] blk-throttle: fix possible deadlock for fs reclaim under rq_qos_mutex Yu Kuai
2026-01-04 16:38   ` Nilay Shroff
2026-01-07 12:04   ` Ming Lei
2026-01-08 16:56     ` Yu Kuai
2026-01-09  2:18       ` Ming Lei
2026-01-09  2:22         ` Yu Kuai
2026-01-09  2:26           ` Ming Lei
2026-01-09  9:09       ` Nilay Shroff
2026-02-11  2:07         ` Yu Kuai
2025-12-31  8:51 ` [PATCH v7 10/16] block/blk-rq-qos: add a new helper rq_qos_add_frozen() Yu Kuai
2026-01-04 16:39   ` Nilay Shroff
2026-01-07 12:14   ` Ming Lei
2025-12-31  8:51 ` [PATCH v7 11/16] blk-wbt: fix incorrect lock order for rq_qos_mutex and freeze queue Yu Kuai
2026-01-04 16:39   ` Nilay Shroff
2026-01-07 12:14   ` Ming Lei
2025-12-31  8:51 ` [PATCH v7 12/16] blk-iocost: " Yu Kuai
2026-01-04 16:39   ` Nilay Shroff
2026-01-07 12:17   ` Ming Lei
2025-12-31  8:51 ` [PATCH v7 13/16] blk-iolatency: " Yu Kuai
2026-01-04 16:40   ` Nilay Shroff
2026-01-07 12:20   ` Ming Lei
2025-12-31  8:51 ` [PATCH v7 14/16] block/blk-rq-qos: cleanup rq_qos_add() Yu Kuai
2026-01-04 16:40   ` Nilay Shroff
2025-12-31  8:51 ` [PATCH v7 15/16] blk-rq-qos: remove queue frozen from rq_qos_del() Yu Kuai
2026-01-04 16:40   ` Nilay Shroff
2025-12-31  8:51 ` [PATCH v7 16/16] blk-cgroup: remove queue frozen from blkcg_activate_policy() Yu Kuai
2026-01-04 16:41   ` Nilay Shroff

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox