aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/device_handler
diff options
context:
space:
mode:
authorRob Evers <revers@redhat.com>2012-05-18 14:08:56 -0400
committerJames Bottomley <JBottomley@Parallels.com>2012-07-20 03:58:33 -0400
commitbc97f4bb4490ff31b2be8e006f750d4187ef0c7e (patch)
treed6099236a840c8027dca206835541dede00f63af /drivers/scsi/device_handler
parent8e67ce6072a0ab7fcefbbd2913fa4eaf3fdd8d68 (diff)
[SCSI] scsi_dh_alua: backoff alua rtpg retry linearly vs. geometrically
Currently the backoff algorithm for when to retry alua rtpg requests progresses geometrically as so: 2, 4, 8, 16, 32, 64... seconds. This progression can lead to un-needed delay in retrying alua rtpg requests when the rtpgs are delayed. A less aggressive backoff algorithm that is additive would not lead to such large jumps when delays start getting long, but would backoff linearly: 2, 4, 6, 8, 10... seconds. Signed-off-by: Martin George <marting@netapp.com> Signed-off-by: Rob Evers <revers@redhat.com> Reviewed-by: Babu Moger <babu.moger@netapp.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
Diffstat (limited to 'drivers/scsi/device_handler')
-rw-r--r--drivers/scsi/device_handler/scsi_dh_alua.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/scsi/device_handler/scsi_dh_alua.c b/drivers/scsi/device_handler/scsi_dh_alua.c
index 5a3448856962..0d573822bf43 100644
--- a/drivers/scsi/device_handler/scsi_dh_alua.c
+++ b/drivers/scsi/device_handler/scsi_dh_alua.c
@@ -527,7 +527,7 @@ static int alua_rtpg(struct scsi_device *sdev, struct alua_dh_data *h)
527 unsigned char *ucp; 527 unsigned char *ucp;
528 unsigned err; 528 unsigned err;
529 bool rtpg_ext_hdr_req = 1; 529 bool rtpg_ext_hdr_req = 1;
530 unsigned long expiry, interval = 1000; 530 unsigned long expiry, interval = 0;
531 unsigned int tpg_desc_tbl_off; 531 unsigned int tpg_desc_tbl_off;
532 unsigned char orig_transition_tmo; 532 unsigned char orig_transition_tmo;
533 533
@@ -632,7 +632,7 @@ static int alua_rtpg(struct scsi_device *sdev, struct alua_dh_data *h)
632 case TPGS_STATE_TRANSITIONING: 632 case TPGS_STATE_TRANSITIONING:
633 if (time_before(jiffies, expiry)) { 633 if (time_before(jiffies, expiry)) {
634 /* State transition, retry */ 634 /* State transition, retry */
635 interval *= 2; 635 interval += 2000;
636 msleep(interval); 636 msleep(interval);
637 goto retry; 637 goto retry;
638 } 638 }