Commit 975f7d46 authored by Bruno Prémont's avatar Bruno Prémont Committed by Christoph Hellwig

qla2xxx: fix busy wait regression

Commit e05fe292 (qla2xxx: Honor FCP_RSP retry delay timer field.)
causes systems to busy-wait for about 3 minutes after boot prior to
detecting SAN disks.

During this wait period one kworker is running full-time
(though /proc/<pid>/stack has no useful data). Another kworker is
waiting for IO to complete during that whole time period.

Looking at drivers/scsi/qla2xxx/qla_os.c, fcport->retry_delay_timestamp
has a special value of 0 though that 0 value forces system to wait when
jiffies is very large value (e.g. 4294952605 - "negative" value when
signed on 32bit systems).
Signed-off-by: default avatarBruno Prémont <bonbons@linux-vserver.org>
Acked-by: default avatarChad Dupuis <chad.dupuis@qlogic.com>
Signed-off-by: default avatarChristoph Hellwig <hch@lst.de>
parent 693a30b8
...@@ -734,7 +734,9 @@ qla2xxx_queuecommand(struct Scsi_Host *host, struct scsi_cmnd *cmd) ...@@ -734,7 +734,9 @@ qla2xxx_queuecommand(struct Scsi_Host *host, struct scsi_cmnd *cmd)
* Return target busy if we've received a non-zero retry_delay_timer * Return target busy if we've received a non-zero retry_delay_timer
* in a FCP_RSP. * in a FCP_RSP.
*/ */
if (time_after(jiffies, fcport->retry_delay_timestamp)) if (fcport->retry_delay_timestamp == 0) {
/* retry delay not set */
} else if (time_after(jiffies, fcport->retry_delay_timestamp))
fcport->retry_delay_timestamp = 0; fcport->retry_delay_timestamp = 0;
else else
goto qc24_target_busy; goto qc24_target_busy;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment