From: Nilay Shroff <nilay@linux.ibm.com>
To: Yu Kuai <yukuai@fnnas.com>,
axboe@kernel.dk, linux-block@vger.kernel.org, tj@kernel.org,
ming.lei@redhat.com
Subject: Re: [PATCH v6 04/13] blk-rq-qos: fix possible debugfs_mutex deadlock
Date: Tue, 30 Dec 2025 11:05:51 +0530 [thread overview]
Message-ID: <adb48c62-968e-4eef-9174-5b2d7cc23b9b@linux.ibm.com> (raw)
In-Reply-To: <20251225103248.1303397-5-yukuai@fnnas.com>
On 12/25/25 4:02 PM, Yu Kuai wrote:
> Currently rq-qos debugfs entries are created from rq_qos_add(), while
> rq_qos_add() can be called while queue is still frozen. This can
> deadlock because creating new entries can trigger fs reclaim.
>
> Fix this problem by delaying creating rq-qos debugfs entries after queue
> is unfrozen.
>
> - For wbt, 1) it can be initialized by default, fix it by calling new
> helper after wbt_init() from wbt_init_enable_default(); 2) it can be
> initialized by sysfs, fix it by calling new helper after queue is
> unfrozen from wbt_set_lat().
> - For iocost and iolatency, they can only be initialized by blkcg
> configuration, however, they don't have debugfs entries for now, hence
> they are not handled yet.
>
> Signed-off-by: Yu Kuai <yukuai@fnnas.com>
Looks good to me:
Reviewed-by: Nilay Shroff <nilay@linux.ibm.com>
next prev parent reply other threads:[~2025-12-30 5:36 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-12-25 10:32 [PATCH v6 00/13] blk-mq: fix possible deadlocks Yu Kuai
2025-12-25 10:32 ` [PATCH v6 01/13] blk-wbt: factor out a helper wbt_set_lat() Yu Kuai
2025-12-25 10:32 ` [PATCH v6 02/13] blk-wbt: fix possible deadlock to nest pcpu_alloc_mutex under q_usage_counter Yu Kuai
2025-12-30 5:34 ` Nilay Shroff
2025-12-25 10:32 ` [PATCH v6 03/13] blk-mq-debugfs: factor out a helper to register debugfs for all rq_qos Yu Kuai
2025-12-25 10:32 ` [PATCH v6 04/13] blk-rq-qos: fix possible debugfs_mutex deadlock Yu Kuai
2025-12-30 5:35 ` Nilay Shroff [this message]
2025-12-25 10:32 ` [PATCH v6 05/13] blk-mq-debugfs: make blk_mq_debugfs_register_rqos() static Yu Kuai
2025-12-25 10:32 ` [PATCH v6 06/13] blk-mq-debugfs: remove blk_mq_debugfs_unregister_rqos() Yu Kuai
2025-12-30 5:33 ` Nilay Shroff
2025-12-31 5:38 ` Yu Kuai
2025-12-25 10:32 ` [PATCH v6 07/13] blk-mq-debugfs: warn about possible deadlock Yu Kuai
2025-12-30 5:37 ` Nilay Shroff
2025-12-30 6:04 ` kernel test robot
2025-12-30 13:05 ` Nilay Shroff
2025-12-31 5:59 ` Yu Kuai
2025-12-25 10:32 ` [PATCH v6 08/13] blk-throttle: fix possible deadlock for fs reclaim under rq_qos_mutex Yu Kuai
2025-12-25 10:32 ` [PATCH v6 09/13] block/blk-rq-qos: add a new helper rq_qos_add_frozen() Yu Kuai
2025-12-25 10:32 ` [PATCH v6 10/13] blk-wbt: fix incorrect lock order for rq_qos_mutex and freeze queue Yu Kuai
2025-12-25 10:32 ` [PATCH v6 11/13] blk-iocost: " Yu Kuai
2025-12-25 10:32 ` [PATCH v6 12/13] blk-iolatency: " Yu Kuai
2025-12-25 10:32 ` [PATCH v6 13/13] block/blk-rq-qos: cleanup rq_qos_add() Yu Kuai
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=adb48c62-968e-4eef-9174-5b2d7cc23b9b@linux.ibm.com \
--to=nilay@linux.ibm.com \
--cc=axboe@kernel.dk \
--cc=linux-block@vger.kernel.org \
--cc=ming.lei@redhat.com \
--cc=tj@kernel.org \
--cc=yukuai@fnnas.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.