From: Jens Axboe <axboe@kernel.dk>
To: Bart Van Assche <bvanassche@acm.org>,
Weiping Zhang <zhangweiping@didiglobal.com>
Cc: linux-block@vger.kernel.org
Subject: Re: [RFC PATCH v2] block: add io timeout to sysfs
Date: Wed, 28 Nov 2018 09:18:18 -0700 [thread overview]
Message-ID: <a552c7c6-a6a6-1ced-2754-8045d651eec6@kernel.dk> (raw)
In-Reply-To: <1543421621.185366.101.camel@acm.org>
On 11/28/18 9:13 AM, Bart Van Assche wrote:
> On Mon, 2018-11-19 at 22:11 +0800, Weiping Zhang wrote:
>> Give a interface to adjust io timeout by device.
>>
>> Signed-off-by: Weiping Zhang <zhangweiping@didiglobal.com>
>> ---
>>
>> Changes since v1:
>> * make sure timeout > 0
>>
>> block/blk-sysfs.c | 27 +++++++++++++++++++++++++++
>> 1 file changed, 27 insertions(+)
>
> Documentation for new block layer sysfs attributes should be added in
> Documentation/ABI/testing/sysfs-block and also in Documentation/block/queue-sysfs.txt.
> Please add such documentation for this new attribute.
Yes, please send a followup patch to add the documentation.
>> +static ssize_t queue_io_timeout_store(struct request_queue *q, const char *page,
>> + size_t count)
>> +{
>> + unsigned int val;
>> + int err;
>> +
>> + err = kstrtou32(page, 10, &val);
>> + if (err || val == 0)
>> + return -EINVAL;
>> +
>> + blk_queue_rq_timeout(q, val);
>> +
>> + return count;
>> +}
>
> Setting the block layer timeout to a very high value (e.g. hours) may make it look
> like a request got stuck without users having an easy way of figuring out what is
> going on. I'm wondering whether this function should restrict the upper bound for
> block layer timeouts. How about limiting timeout values to ten minutes?
This is no different than folks using SG_IO/bsg and putting a high timeout
in their commands. I don't think we should impose a limit, if you set it
high, you get exactly what you asked for.
--
Jens Axboe
prev parent reply other threads:[~2018-11-28 16:18 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-11-19 14:11 [RFC PATCH v2] block: add io timeout to sysfs Weiping Zhang
2018-11-28 14:52 ` Weiping Zhang
2018-11-28 15:20 ` Jens Axboe
2018-11-28 16:13 ` Bart Van Assche
2018-11-28 16:18 ` Jens Axboe [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=a552c7c6-a6a6-1ced-2754-8045d651eec6@kernel.dk \
--to=axboe@kernel.dk \
--cc=bvanassche@acm.org \
--cc=linux-block@vger.kernel.org \
--cc=zhangweiping@didiglobal.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 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).