linux-scsi.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [Patch] Fix regression in 3.18 caused by e05fe29248 qla2xxx: Honor FCP_RSP retry delay timer field.
@ 2014-12-19  9:29 Bruno Prémont
  2014-12-23  8:32 ` Christoph Hellwig
  2015-01-05 19:25 ` Christoph Hellwig
  0 siblings, 2 replies; 4+ messages in thread
From: Bruno Prémont @ 2014-12-19  9:29 UTC (permalink / raw)
  To: Chad Dupuis, Saurav Kashyap, Christoph Hellwig
  Cc: linux-scsi, qla2xxx-upstream

Commit e05fe29248 (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: Bruno Prémont <bonbons@linux-vserver.org>
---
This fix probably still misses the special case when retry delay wants
jiffies to wrap around to 0...

 drivers/scsi/qla2xxx/qla_os.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/drivers/scsi/qla2xxx/qla_os.c b/drivers/scsi/qla2xxx/qla_os.c
index db3dbd9..1df4c66 100644
--- a/drivers/scsi/qla2xxx/qla_os.c
+++ b/drivers/scsi/qla2xxx/qla_os.c
@@ -735,7 +735,9 @@ qla2xxx_queuecommand(struct Scsi_Host *host, struct scsi_cmnd *cmd)
 	 * Return target busy if we've received a non-zero retry_delay_timer
 	 * 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;
 	else
 		goto qc24_target_busy;
--
2.0.4
--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [Patch] Fix regression in 3.18 caused by e05fe29248 qla2xxx: Honor FCP_RSP retry delay timer field.
  2014-12-19  9:29 [Patch] Fix regression in 3.18 caused by e05fe29248 qla2xxx: Honor FCP_RSP retry delay timer field Bruno Prémont
@ 2014-12-23  8:32 ` Christoph Hellwig
  2015-01-05 17:09   ` Chad Dupuis
  2015-01-05 19:25 ` Christoph Hellwig
  1 sibling, 1 reply; 4+ messages in thread
From: Christoph Hellwig @ 2014-12-23  8:32 UTC (permalink / raw)
  To: Bruno Prémont
  Cc: Chad Dupuis, Saurav Kashyap, Christoph Hellwig, linux-scsi,
	qla2xxx-upstream

Chad, Saurav,

does this look ok to you?


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [Patch] Fix regression in 3.18 caused by e05fe29248 qla2xxx: Honor FCP_RSP retry delay timer field.
  2014-12-23  8:32 ` Christoph Hellwig
@ 2015-01-05 17:09   ` Chad Dupuis
  0 siblings, 0 replies; 4+ messages in thread
From: Chad Dupuis @ 2015-01-05 17:09 UTC (permalink / raw)
  To: Christoph Hellwig
  Cc: Bruno Prémont, Saurav Kashyap, linux-scsi, qla2xxx-upstream



On Tue, 23 Dec 2014, Christoph Hellwig wrote:

> Chad, Saurav,
>
> does this look ok to you?
>
>

Yes, this looks ok.

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [Patch] Fix regression in 3.18 caused by e05fe29248 qla2xxx: Honor FCP_RSP retry delay timer field.
  2014-12-19  9:29 [Patch] Fix regression in 3.18 caused by e05fe29248 qla2xxx: Honor FCP_RSP retry delay timer field Bruno Prémont
  2014-12-23  8:32 ` Christoph Hellwig
@ 2015-01-05 19:25 ` Christoph Hellwig
  1 sibling, 0 replies; 4+ messages in thread
From: Christoph Hellwig @ 2015-01-05 19:25 UTC (permalink / raw)
  To: Bruno Prémont
  Cc: Chad Dupuis, Saurav Kashyap, linux-scsi, qla2xxx-upstream

Thanks, applied to scsi-for-3.19.

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2015-01-05 19:25 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-12-19  9:29 [Patch] Fix regression in 3.18 caused by e05fe29248 qla2xxx: Honor FCP_RSP retry delay timer field Bruno Prémont
2014-12-23  8:32 ` Christoph Hellwig
2015-01-05 17:09   ` Chad Dupuis
2015-01-05 19:25 ` Christoph Hellwig

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).