aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux
diff options
context:
space:
mode:
authorTejun Heo <htejun@gmail.com>2008-05-19 13:17:52 -0400
committerJeff Garzik <jgarzik@redhat.com>2008-07-14 15:59:32 -0400
commit0a2c0f56159999e20015241d3b8fa89b1ab14309 (patch)
tree2c516452d3b3f85e9a4092b6092160e123d5f5d4 /include/linux
parent341c2c958ec7bdd9f54733a8b0b432fe76842a82 (diff)
libata: improve EH retry delay handling
EH retries were delayed by 5 seconds to ensure that resets don't occur back-to-back. However, this 5 second delay is superflous or excessive in many cases. For example, after IDENTIFY times out, there's no reason to wait five more seconds before retrying. This patch adds ehc->last_reset timestamp and record the timestamp for the last reset trial or success and uses it to space resets by ATA_EH_RESET_COOL_DOWN which is 5 secs and removes unconditional 5 sec sleeps. As this change makes inter-try waits often shorter and they're redundant in nature, this patch also removes the "retrying..." messages. While at it, convert explicit rounding up division to DIV_ROUND_UP(). This change speeds up EH in many cases w/o sacrificing robustness. Signed-off-by: Tejun Heo <htejun@gmail.com> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/libata.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/include/linux/libata.h b/include/linux/libata.h
index 94110b652b30..9058c2a325a9 100644
--- a/include/linux/libata.h
+++ b/include/linux/libata.h
@@ -602,6 +602,8 @@ struct ata_eh_context {
602 unsigned int did_probe_mask; 602 unsigned int did_probe_mask;
603 unsigned int saved_ncq_enabled; 603 unsigned int saved_ncq_enabled;
604 u8 saved_xfer_mode[ATA_MAX_DEVICES]; 604 u8 saved_xfer_mode[ATA_MAX_DEVICES];
605 /* timestamp for the last reset attempt or success */
606 unsigned long last_reset;
605}; 607};
606 608
607struct ata_acpi_drive 609struct ata_acpi_drive