From: Ric Wheeler <ric@emc.com>
To: Mark Lord <liml@rtr.ca>
Cc: Tejun Heo <htejun@gmail.com>,
jeff@garzik.org, linux-ide@vger.kernel.org,
alan@lxorguk.ukuu.org.uk
Subject: Re: [PATCHSET #upstream] libata: improve FLUSH error handling
Date: Thu, 27 Mar 2008 13:53:58 -0400 [thread overview]
Message-ID: <47EBDF36.5080504@emc.com> (raw)
In-Reply-To: <47EBAE2B.8070102@rtr.ca>
Mark Lord wrote:
> Tejun Heo wrote:
>>
>> As the code is being smart against retrying needlessly, it won't be
>> too dangerous to increase the 20 tries (taken from Alan's patch) but I
>> think it's as good as any other random number. If anyone knows any
>> meaningful number, please chime in. The same goes for 60 secs timeout
>> too.
> ..
>
> I really think that we should enforce a strict upper limit on the time
> that can be spent inside the flush-cache near-infinite loop being
> introduced.
>
> Some things rely on I/O completing or failing in a time deterministic
> manner.
>
> Really, the entire flush + retries etc.. should never, ever, be permitted
> to take more than XX seconds total. Not 60 seconds per retry, but XX
> seconds
> total for the original command + however many retries we can fit in there.
>
> As for the value of XX, well.. make it a sysfs attribute, with a default
> of something "sensible". The time bounds is really dependent upon how
> quickly the drive can empty its onboard cache, or how large a cache it has.
>
> Figure the biggest drives will have no more than, say 64MB of cache for
> many years (biggest SATA drive now uses 16MB). Assuming near-worst case
> I/O size of 4KB, that's 16384 I/O operations, if none were adjacent on
> disk.
>
> What's the average access time these days? Say.. 20ms worst case for any
> drive with a cache that huge? That's unrealistically slow for data that's
> already in the drive cache, but .. 16384 * .020 seconds = 328 seconds.
>
> Absolute theoretical worst case for a drive with a buffer 4X the largest
> current size: 328 seconds. Not taking into account having bad-sector
> retries for each of those I/O blocks, but *nobody* is going to wait
> that long anyway. They'll have long since pulled the power cord or
> reached for the BIG RED BUTTON.
>
> On a 16MB cache drive, that number would be 328 / 4 = 82 seconds.
>
> That's what I'd put for the limit.
> But we could be slighly nonsensical and agree upon 120 seconds. :)
>
> Cheers
>
I think that the 30 seconds was meant to be that worst case time for the drive
to respond to a command. We try to push vendors to respond in much less time
than that (it's important to get things like the fast fail path for RAID working
correctly), say something like 10-15 seconds.
ric
next prev parent reply other threads:[~2008-03-27 18:01 UTC|newest]
Thread overview: 32+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-03-27 10:14 [PATCHSET #upstream] libata: improve FLUSH error handling Tejun Heo
2008-03-27 10:14 ` [PATCH 1/4] libata: make ata_tf_to_lba[48]() generic Tejun Heo
2008-04-04 7:45 ` Jeff Garzik
2008-03-27 10:14 ` [PATCH 2/4] libata: implement ATA_QCFLAG_RETRY Tejun Heo
2008-03-27 10:14 ` [PATCH 3/4] libata: kill unused ata_flush_cache() Tejun Heo
2008-03-27 10:14 ` [PATCH 4/4] libata: improve FLUSH error handling Tejun Heo
2008-04-04 7:46 ` Jeff Garzik
2008-03-27 10:23 ` Debug patch to induce errors on FLUSH Tejun Heo
2008-03-27 14:24 ` [PATCHSET #upstream] libata: improve FLUSH error handling Mark Lord
2008-03-27 14:35 ` Mark Lord
2008-03-27 15:31 ` Alan Cox
2008-03-27 18:01 ` Ric Wheeler
2008-03-28 1:57 ` Tejun Heo
2008-03-28 2:33 ` Mark Lord
2008-03-28 13:36 ` Ric Wheeler
2008-03-28 14:52 ` Tejun Heo
2008-03-28 14:53 ` Ric Wheeler
2008-03-28 15:16 ` Alan Cox
2008-03-28 16:57 ` Ric Wheeler
2008-03-28 16:04 ` Mark Lord
2008-03-27 17:53 ` Ric Wheeler [this message]
2008-03-27 18:52 ` Jeff Garzik
2008-03-27 20:23 ` Ric Wheeler
2008-03-28 7:46 ` Andi Kleen
2008-03-28 8:30 ` Tejun Heo
2008-03-28 8:48 ` Andi Kleen
2008-03-28 8:53 ` Tejun Heo
2008-03-27 17:51 ` Ric Wheeler
2008-03-27 18:53 ` Jeff Garzik
2008-03-27 22:00 ` Alan Cox
2008-03-28 2:02 ` Tejun Heo
2008-03-28 9:48 ` Alan Cox
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=47EBDF36.5080504@emc.com \
--to=ric@emc.com \
--cc=alan@lxorguk.ukuu.org.uk \
--cc=htejun@gmail.com \
--cc=jeff@garzik.org \
--cc=liml@rtr.ca \
--cc=linux-ide@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 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.