From: Jeff Garzik <jeff@garzik.org>
To: Tejun Heo <htejun@gmail.com>
Cc: linux-ide@vger.kernel.org, andrew.m.paprocki@gmail.com,
ballen@gravity.phys.uwm.edu
Subject: Re: [PATCH #upstream] libata: track SLEEP state and issue SRST to wake it up
Date: Thu, 25 Oct 2007 05:38:36 -0400 [thread overview]
Message-ID: <4720641C.6080806@garzik.org> (raw)
In-Reply-To: <20071025093036.GK11853@htj.dyndns.org>
Tejun Heo wrote:
> ATA devices in SLEEP mode don't respond to any commands. SRST is
> necessary to wake it up. Till now, when a command is issued to a
> device in SLEEP mode, the command times out, which makes EH reset the
> device and retry the command after that, causing a long delay.
>
> This patch makes libata track SLEEP state and issue SRST automatically
> if a command is about to be issued to a device in SLEEP.
>
> Signed-off-by: Tejun Heo <htejun@gmail.com>
> Cc: Bruce Allen <ballen@gravity.phys.uwm.edu>
> Cc: Andrew Paprocki <andrew@ishiboo.com>
> ---
> This patch is against
>
> #upstream
> + relocate-and-fix-post-command-processing patch
> (http://article.gmane.org/gmane.linux.ide/24001)
>
> The infinite loop with the previous patch wasn't caused by bug in
> sleep state tracking. It was happening because post-command
> processing was being performed for commands which are being retried
> from EH, so what happened was.
>
> 1. device is flagged SLEEPING
>
> 2. SLEEP is issued, as device is sleeping, EH is rescheduled against
> the qc for SLEEP.
>
> 3. EH kicks in and wakes up the device and clears SLEEPING.
>
> 4. EH finishes up failed qc which triggers post-command processing and
> sets SLEEPING.
>
> 5. SCSI command is retried, go back to #2.
>
> relocate-and-fix-post-command-processing patch fixes the original bug
> in post-command processing and this patch doesn't cause infinite loop
> anymore.
>
> drivers/ata/libata-core.c | 12 ++++++++++++
> drivers/ata/libata-eh.c | 4 +++-
> include/linux/ata.h | 1 +
> include/linux/libata.h | 1 +
> 4 files changed, 17 insertions(+), 1 deletion(-)
applied, both of these changes were nice improvements, as well as fixing
problems
prev parent reply other threads:[~2007-10-25 9:38 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-10-25 9:30 [PATCH #upstream] libata: track SLEEP state and issue SRST to wake it up Tejun Heo
2007-10-25 9:38 ` Jeff Garzik [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=4720641C.6080806@garzik.org \
--to=jeff@garzik.org \
--cc=andrew.m.paprocki@gmail.com \
--cc=ballen@gravity.phys.uwm.edu \
--cc=htejun@gmail.com \
--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.