From: Pierre Beck <mail@pierre-beck.de>
To: linux-raid@vger.kernel.org
Subject: Should mdraid implement timeouts?
Date: Thu, 19 Apr 2012 15:11:45 +0200 [thread overview]
Message-ID: <4F900F10.1040405@pierre-beck.de> (raw)
Hello,
currently, mdraid will simply block and wait for the underlying layers
to execute commands and does not handle timeouts on its own.
In a perfect world, disks will respond within a limited timeframe when
for example a bad sector is encountered. Unfortunately, I see even disks
with set TLER that don't. Then, with a configurable timeout, Linux
Kernel will reset the device in question, then the bus, then the
controller. This process takes time (and I think the bus / controller
reset is really adding to that time and should be optional in the first
place) during which data is unavailable, though there is redundancy and
another device is ready to respond.
For a read operations, things are simple: mdraid can re-issue the read
on the redundant device(s) and deliver data. For write operations, I see
no other option than kicking the disk from the array. With write-intent
bitmaps in place, the disk can be re-added and resync fast once it is
available again.
If possible, commands sent to the bad disk should be aborted, so Kernel
doesn't reset the bus.
To add response time management, the timeout could work with several
values and sum up like this:
max_response_time_ms = 20
timeout_ms = 10000
Every request would measure response time. If response time -
max_response_time_ms > 0, decrease timeout_ms temporarily by that value.
So slow disks would be kicked by the same timeout mechanism.
Greetings,
Pierre Beck
next reply other threads:[~2012-04-19 13:11 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-04-19 13:11 Pierre Beck [this message]
2012-04-19 21:46 ` Should mdraid implement timeouts? NeilBrown
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=4F900F10.1040405@pierre-beck.de \
--to=mail@pierre-beck.de \
--cc=linux-raid@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;
as well as URLs for NNTP newsgroup(s).