* [patch 08/10] scsi/dpt_i2o: replace schedule_timeout() with msleep_interruptible()
@ 2004-10-21 8:47 janitor
0 siblings, 0 replies; 3+ messages in thread
From: janitor @ 2004-10-21 8:47 UTC (permalink / raw)
To: James.Bottomley; +Cc: linux-scsi, janitor, nacc
Any comments would be appreciated.
Description: Use msleep_interruptible() instead of
schedule_timeout() to guarantee the task delays as expected.
Signed-off-by: Nishanth Aravamudan <nacc@us.ibm.com>
Signed-off-by: Maximilian Attems <janitor@sternwelten.at>
---
linux-2.6.9-max/drivers/scsi/dpt_i2o.c | 2 +-
1 files changed, 1 insertion(+), 1 deletion(-)
diff -puN drivers/scsi/dpt_i2o.c~msleep_interruptible-drivers_scsi_dpt_i2o drivers/scsi/dpt_i2o.c
--- linux-2.6.9/drivers/scsi/dpt_i2o.c~msleep_interruptible-drivers_scsi_dpt_i2o 2004-10-21 02:41:53.000000000 +0200
+++ linux-2.6.9-max/drivers/scsi/dpt_i2o.c 2004-10-21 02:41:53.000000000 +0200
@@ -1179,7 +1179,7 @@ static int adpt_i2o_post_wait(adpt_hba*
// dangerous.
status = -ETIME;
}
- schedule_timeout(timeout*HZ);
+ msleep_interruptible(timeout * 1000);
}
if(pHba->host)
spin_lock_irq(pHba->host->host_lock);
_
^ permalink raw reply [flat|nested] 3+ messages in thread
* RE: [patch 08/10] scsi/dpt_i2o: replace schedule_timeout() with msleep_interruptible()
@ 2004-10-21 11:44 Salyzyn, Mark
2004-10-21 12:50 ` James Bottomley
0 siblings, 1 reply; 3+ messages in thread
From: Salyzyn, Mark @ 2004-10-21 11:44 UTC (permalink / raw)
To: janitor, James.Bottomley; +Cc: linux-scsi, nacc
The timeout granularity of 1 second should be the first clue that this
is not important. Commands complete and wake up the task under normal
operation; the timeout is to deal with an errant controller.
Sincerely -- Mark Salyzyn
-----Original Message-----
From: linux-scsi-owner@vger.kernel.org
[mailto:linux-scsi-owner@vger.kernel.org] On Behalf Of
janitor@sternwelten.at
Sent: Thursday, October 21, 2004 4:47 AM
To: James.Bottomley@SteelEye.com
Cc: linux-scsi@vger.kernel.org; janitor@sternwelten.at; nacc@us.ibm.com
Subject: [patch 08/10] scsi/dpt_i2o: replace schedule_timeout() with
msleep_interruptible()
Any comments would be appreciated.
Description: Use msleep_interruptible() instead of
schedule_timeout() to guarantee the task delays as expected.
Signed-off-by: Nishanth Aravamudan <nacc@us.ibm.com>
Signed-off-by: Maximilian Attems <janitor@sternwelten.at>
---
linux-2.6.9-max/drivers/scsi/dpt_i2o.c | 2 +-
1 files changed, 1 insertion(+), 1 deletion(-)
diff -puN
drivers/scsi/dpt_i2o.c~msleep_interruptible-drivers_scsi_dpt_i2o
drivers/scsi/dpt_i2o.c
---
linux-2.6.9/drivers/scsi/dpt_i2o.c~msleep_interruptible-drivers_scsi_dpt
_i2o 2004-10-21 02:41:53.000000000 +0200
+++ linux-2.6.9-max/drivers/scsi/dpt_i2o.c 2004-10-21
02:41:53.000000000 +0200
@@ -1179,7 +1179,7 @@ static int adpt_i2o_post_wait(adpt_hba*
// dangerous.
status = -ETIME;
}
- schedule_timeout(timeout*HZ);
+ msleep_interruptible(timeout * 1000);
}
if(pHba->host)
spin_lock_irq(pHba->host->host_lock);
_
-
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 [flat|nested] 3+ messages in thread
* RE: [patch 08/10] scsi/dpt_i2o: replace schedule_timeout() with msleep_interruptible()
2004-10-21 11:44 [patch 08/10] scsi/dpt_i2o: replace schedule_timeout() with msleep_interruptible() Salyzyn, Mark
@ 2004-10-21 12:50 ` James Bottomley
0 siblings, 0 replies; 3+ messages in thread
From: James Bottomley @ 2004-10-21 12:50 UTC (permalink / raw)
To: Salyzyn, Mark; +Cc: janitor, SCSI Mailing List, nacc
On Thu, 2004-10-21 at 07:44, Salyzyn, Mark wrote:
> The timeout granularity of 1 second should be the first clue that this
> is not important. Commands complete and wake up the task under normal
> operation; the timeout is to deal with an errant controller.
Erm, yes, but what you're doing is clearly incorrect, and the reason we
went to msleep variants anyway. Your code forgets to set the current
state, so you stand a good chance of returning immediately from the
schedule_timeout() without even yielding the processor.
James
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2004-10-21 12:50 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-10-21 11:44 [patch 08/10] scsi/dpt_i2o: replace schedule_timeout() with msleep_interruptible() Salyzyn, Mark
2004-10-21 12:50 ` James Bottomley
-- strict thread matches above, loose matches on Subject: below --
2004-10-21 8:47 janitor
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox