From: Nilay Shroff <nilay@linux.ibm.com>
To: Bart Van Assche <bvanassche@acm.org>, 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: Tue, 1 Jul 2025 10:26:35 +0530 [thread overview]
Message-ID: <a1f5b332-d3c5-4a38-b450-014b14f99ef1@linux.ibm.com> (raw)
In-Reply-To: <765d62a8-bb5d-4f1d-8996-afc005bc2d1d@acm.org>
On 6/30/25 8:58 PM, Bart Van Assche wrote:
> 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.
Yes agreed.. Your above points makes sense. As this is REGRESSION we
must fix this. I am convinced that the readahead attribute is not used
in IO hotpath so in that sense your patch is valid, no issues with that.
However my only concern was about other sysfs attributes which needs
queue freeze and that's legitimate as those attributes are used in IO
hotpath. But I just saw that you proposed some idea about addressing
those other sysfs attributes, so lets discuss this on that thread.
Meanwhile, I'd review your patch.
Thanks,
--Nilay
prev parent reply other threads:[~2025-07-01 4:56 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
2025-07-01 4:56 ` Nilay Shroff [this message]
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=a1f5b332-d3c5-4a38-b450-014b14f99ef1@linux.ibm.com \
--to=nilay@linux.ibm.com \
--cc=axboe@kernel.dk \
--cc=bvanassche@acm.org \
--cc=hch@lst.de \
--cc=linux-block@vger.kernel.org \
--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