From: Bart Van Assche <bvanassche@acm.org>
To: Nilay Shroff <nilay@linux.ibm.com>, Jens Axboe <axboe@kernel.dk>
Cc: linux-block@vger.kernel.org, Christoph Hellwig <hch@lst.de>,
stable@vger.kernel.org
Subject: Re: [PATCH] block: Fix a deadlock related to modifying the readahead attribute
Date: Mon, 30 Jun 2025 08:28:08 -0700 [thread overview]
Message-ID: <765d62a8-bb5d-4f1d-8996-afc005bc2d1d@acm.org> (raw)
In-Reply-To: <6a9bf05f-f315-417a-b328-6a243de3568e@linux.ibm.com>
On 6/30/25 3:41 AM, Nilay Shroff wrote:
> Looking at your earlier dmsetup command:
> # dmsetup table mpatha
> 0 65536 multipath 1 queue_if_no_path 1 alua 1 1 service-time 0 1 2 8:32 1 1
>
> In the above rule, the option queue_if_no_path seems bit odd (unless used
> with timeout). Can't we add module param queue_if_no_path_timeout_secs=<N>
> while loading dm-multipath and thus avoid hanging the queue I/O indefinitely
> when all paths of a multipath device is lost? IMO, queue_if_no_path without
> timeout may make sense when we know that the paths will eventually recover
> and that applications should simply wait.
I refuse to modify the tests that trigger the deadlock because:
1. The deadlock is a REGRESSION. Regressions are not tolerated in the
Linux kernel and should be fixed instead of arguing about whether or
not the use case should be modified.
2. The test that triggers the deadlock is not new. It is almost ten
years old and the deadlock reported at the start of this email thread
is the first deadlock in the block layer triggered by that test.
3. queue_if_no_path is widely used to avoid I/O errors if all paths are
temporarily unavailable and if it is not known how long it will take
to restore a path. queue_if_no_path can e.g. be used to prevent I/O
errors if a technician mistakenly pulls the wrong cable(s) in a data
center.
4. Unnecessary blk_mq_freeze_queue()/blk_mq_unfreeze_queue() pairs slow
down the workflows that trigger these kernel function calls. Hence,
if blk_mq_freeze_queue() and blk_mq_unfreeze_queue() are called
unnecessarily, the calls to these functions should be removed.
Bart.
next prev parent reply other threads:[~2025-06-30 15:28 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-06-25 19:54 [PATCH] block: Fix a deadlock related to modifying the readahead attribute Bart Van Assche
2025-06-26 5:15 ` Christoph Hellwig
2025-06-26 16:07 ` Bart Van Assche
2025-06-26 5:31 ` Nilay Shroff
2025-06-26 16:02 ` Bart Van Assche
2025-06-27 6:16 ` Nilay Shroff
2025-06-27 15:10 ` Bart Van Assche
2025-06-30 10:41 ` Nilay Shroff
2025-06-30 15:28 ` Bart Van Assche [this message]
2025-07-01 4:56 ` Nilay Shroff
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=765d62a8-bb5d-4f1d-8996-afc005bc2d1d@acm.org \
--to=bvanassche@acm.org \
--cc=axboe@kernel.dk \
--cc=hch@lst.de \
--cc=linux-block@vger.kernel.org \
--cc=nilay@linux.ibm.com \
--cc=stable@vger.kernel.org \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox