* Re: [KJ] [announce] 2.6.10-bk13-kj
2005-01-10 16:47 [announce] 2.6.10-bk13-kj Domen Puncer
@ 2005-01-10 18:04 ` Nishanth Aravamudan
2005-01-10 18:10 ` Nishanth Aravamudan
` (16 subsequent siblings)
17 siblings, 0 replies; 21+ messages in thread
From: Nishanth Aravamudan @ 2005-01-10 18:04 UTC (permalink / raw)
To: kj, lkml
On Mon, Jan 10, 2005 at 05:47:03PM +0100, Domen Puncer wrote:
> Patchset of 171 patches is at http://coderock.org/kj/2.6.10-bk13-kj/
>
> Quick patch summary: about 30 new, 30 merged, 30 dropped.
> Seems like most external trees are merged in -linus, so i'll start
> (re)sending old patches.
<snip>
> all patches:
> ------------
<snip>
> msleep-drivers_scsi_ide-scsi.patch
Please consider replacing with the following patch (just a minor change):
Description: Use msleep() instead of schedule_timeout() to guarantee the
task delays as expected. Remove set_current_state() as it is taken care of by
msleep().
Signed-off-by: Nishanth Aravamudan <nacc@us.ibm.com>
--- 2.6.10-v/drivers/scsi/ide-scsi.c 2004-12-24 13:35:01.000000000 -0800
+++ 2.6.10/drivers/scsi/ide-scsi.c 2005-01-05 14:23:05.000000000 -0800
@@ -46,6 +46,7 @@
#include <linux/slab.h>
#include <linux/ide.h>
#include <linux/scatterlist.h>
+#include <linux/delay.h>
#include <asm/io.h>
#include <asm/bitops.h>
@@ -1004,9 +1005,8 @@ static int idescsi_eh_reset (struct scsi
/* ide_do_reset starts a polling handler which restarts itself every 50ms until the reset finishes */
do {
- set_current_state(TASK_UNINTERRUPTIBLE);
spin_unlock_irq(cmd->device->host->host_lock);
- schedule_timeout(HZ/20);
+ msleep(50);
spin_lock_irq(cmd->device->host->host_lock);
} while ( HWGROUP(drive)->handler );
^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: [KJ] [announce] 2.6.10-bk13-kj
2005-01-10 16:47 [announce] 2.6.10-bk13-kj Domen Puncer
2005-01-10 18:04 ` [KJ] " Nishanth Aravamudan
@ 2005-01-10 18:10 ` Nishanth Aravamudan
2005-01-10 18:19 ` [UPDATE PATCH] scsi/osst: replace schedule_timeout() with msleep() Nishanth Aravamudan
` (15 subsequent siblings)
17 siblings, 0 replies; 21+ messages in thread
From: Nishanth Aravamudan @ 2005-01-10 18:10 UTC (permalink / raw)
To: kj, lkml
On Mon, Jan 10, 2005 at 05:47:03PM +0100, Domen Puncer wrote:
> Patchset of 171 patches is at http://coderock.org/kj/2.6.10-bk13-kj/
>
> Quick patch summary: about 30 new, 30 merged, 30 dropped.
> Seems like most external trees are merged in -linus, so i'll start
> (re)sending old patches.
<snip>
> msleep-drivers_scsi_imm.patch
This patch should be dropped. The msleep() call will ignore waitqueue events
set up by prepare_to_wait().
Thanks,
Nish
^ permalink raw reply [flat|nested] 21+ messages in thread
* [UPDATE PATCH] scsi/osst: replace schedule_timeout() with msleep()
2005-01-10 16:47 [announce] 2.6.10-bk13-kj Domen Puncer
2005-01-10 18:04 ` [KJ] " Nishanth Aravamudan
2005-01-10 18:10 ` Nishanth Aravamudan
@ 2005-01-10 18:19 ` Nishanth Aravamudan
2005-01-10 18:23 ` [UPDATE PATCH] scsi/qla1280: replace schedule_timeout() with ssleep() Nishanth Aravamudan
` (14 subsequent siblings)
17 siblings, 0 replies; 21+ messages in thread
From: Nishanth Aravamudan @ 2005-01-10 18:19 UTC (permalink / raw)
To: kj, lkml
On Mon, Jan 10, 2005 at 05:47:03PM +0100, Domen Puncer wrote:
> Patchset of 171 patches is at http://coderock.org/kj/2.6.10-bk13-kj/
>
> Quick patch summary: about 30 new, 30 merged, 30 dropped.
> Seems like most external trees are merged in -linus, so i'll start
> (re)sending old patches.
<snip>
> all patches:
> ------------
<snip>
> msleep-drivers_scsi_osst.patch
Consider replacing with the following patch, as signals are not dealt with in
the existing code:
Description: Use msleep() instead of schedule_timeout() to guarantee the task
delays as expected. Although TASK_INTERRUPTIBLE is used in the current code,
there is no code dealing with an early return / signals_pending().
--- 2.6.10-v/drivers/scsi/osst.c 2004-12-24 13:34:45.000000000 -0800
+++ 2.6.10/drivers/scsi/osst.c 2005-01-05 14:23:05.000000000 -0800
@@ -1488,8 +1488,7 @@ static int osst_reposition_and_retry(OS_
osst_set_frame_position(STp, aSRpnt, frame + skip, 1);
flag = 0;
attempts--;
- set_current_state(TASK_INTERRUPTIBLE);
- schedule_timeout(HZ / 10);
+ msleep(100);
}
if (osst_get_frame_position(STp, aSRpnt) < 0) { /* additional write error */
#if DEBUG
@@ -1550,7 +1549,7 @@ static int osst_reposition_and_retry(OS_
debugging = 0;
}
#endif
- schedule_timeout(HZ / 10);
+ msleep(100);
}
printk(KERN_ERR "%s:E: Failed to find valid tape media\n", name);
#if DEBUG
^ permalink raw reply [flat|nested] 21+ messages in thread
* [UPDATE PATCH] scsi/qla1280: replace schedule_timeout() with ssleep()
2005-01-10 16:47 [announce] 2.6.10-bk13-kj Domen Puncer
` (2 preceding siblings ...)
2005-01-10 18:19 ` [UPDATE PATCH] scsi/osst: replace schedule_timeout() with msleep() Nishanth Aravamudan
@ 2005-01-10 18:23 ` Nishanth Aravamudan
2005-01-10 18:23 ` [UPDATE PATCH] scsi/osst: replace schedule_timeout() with msleep() Nishanth Aravamudan
` (13 subsequent siblings)
17 siblings, 0 replies; 21+ messages in thread
From: Nishanth Aravamudan @ 2005-01-10 18:23 UTC (permalink / raw)
To: kj, lkml
On Mon, Jan 10, 2005 at 05:47:03PM +0100, Domen Puncer wrote:
> Patchset of 171 patches is at http://coderock.org/kj/2.6.10-bk13-kj/
>
> Quick patch summary: about 30 new, 30 merged, 30 dropped.
> Seems like most external trees are merged in -linus, so i'll start
> (re)sending old patches.
<snip>
> all patches:
> ------------
<snip>
> msleep-drivers_scsi_ppa.patch
Please drop this patch, as it incorrectly uses msleep() around waitqueues.
> msleep-drivers_scsi_qla1280.patch
Please conside replacing with the following patch:
Description: Use ssleep() instead of schedule_timeout to guarantee the task
delays as expected.
Signed-off-by: Nishanth Aravamudan <nacc@us.ibm.com>
--- 2.6.10-v/drivers/scsi/qla1280.c 2004-12-24 13:35:40.000000000 -0800
+++ 2.6.10/drivers/scsi/qla1280.c 2005-01-05 14:23:05.000000000 -0800
@@ -2939,7 +2939,7 @@ qla1280_bus_reset(struct scsi_qla_host *
ha->bus_settings[bus].failed_reset_count++;
} else {
spin_unlock_irq(HOST_LOCK);
- schedule_timeout(reset_delay * HZ);
+ ssleep(reset_delay);
spin_lock_irq(HOST_LOCK);
ha->bus_settings[bus].scsi_bus_dead = 0;
^ permalink raw reply [flat|nested] 21+ messages in thread
* [UPDATE PATCH] scsi/osst: replace schedule_timeout() with msleep()
2005-01-10 16:47 [announce] 2.6.10-bk13-kj Domen Puncer
` (3 preceding siblings ...)
2005-01-10 18:23 ` [UPDATE PATCH] scsi/qla1280: replace schedule_timeout() with ssleep() Nishanth Aravamudan
@ 2005-01-10 18:23 ` Nishanth Aravamudan
2005-01-10 20:08 ` [UPDATE PATCH] drivers/dmapool: use TASK_UNINTERRUPTIBLE instead of TASK_INTERRUPTIBLE Nishanth Aravamudan
` (12 subsequent siblings)
17 siblings, 0 replies; 21+ messages in thread
From: Nishanth Aravamudan @ 2005-01-10 18:23 UTC (permalink / raw)
To: kj, lkml
Sorry, forgot signed-off-by line....
On Mon, Jan 10, 2005 at 05:47:03PM +0100, Domen Puncer wrote:
> Patchset of 171 patches is at http://coderock.org/kj/2.6.10-bk13-kj/
>
> Quick patch summary: about 30 new, 30 merged, 30 dropped.
> Seems like most external trees are merged in -linus, so i'll start
> (re)sending old patches.
<snip>
> all patches:
> ------------
<snip>
> msleep-drivers_scsi_osst.patch
Consider replacing with the following patch, as signals are not dealt with in
the existing code:
Description: Use msleep() instead of schedule_timeout() to guarantee the task
delays as expected. Although TASK_INTERRUPTIBLE is used in the current code,
there is no code dealing with an early return / signals_pending().
Signed-off-by: Nishanth Aravamudan <nacc@us.ibm.com>
--- 2.6.10-v/drivers/scsi/osst.c 2004-12-24 13:34:45.000000000 -0800
+++ 2.6.10/drivers/scsi/osst.c 2005-01-05 14:23:05.000000000 -0800
@@ -1488,8 +1488,7 @@ static int osst_reposition_and_retry(OS_
osst_set_frame_position(STp, aSRpnt, frame + skip, 1);
flag = 0;
attempts--;
- set_current_state(TASK_INTERRUPTIBLE);
- schedule_timeout(HZ / 10);
+ msleep(100);
}
if (osst_get_frame_position(STp, aSRpnt) < 0) { /* additional write error */
#if DEBUG
@@ -1550,7 +1549,7 @@ static int osst_reposition_and_retry(OS_
debugging = 0;
}
#endif
- schedule_timeout(HZ / 10);
+ msleep(100);
}
printk(KERN_ERR "%s:E: Failed to find valid tape media\n", name);
#if DEBUG
^ permalink raw reply [flat|nested] 21+ messages in thread
* [UPDATE PATCH] drivers/dmapool: use TASK_UNINTERRUPTIBLE instead of TASK_INTERRUPTIBLE
2005-01-10 16:47 [announce] 2.6.10-bk13-kj Domen Puncer
` (4 preceding siblings ...)
2005-01-10 18:23 ` [UPDATE PATCH] scsi/osst: replace schedule_timeout() with msleep() Nishanth Aravamudan
@ 2005-01-10 20:08 ` Nishanth Aravamudan
2005-01-10 20:13 ` [KJ] [announce] 2.6.10-bk13-kj Nishanth Aravamudan
` (11 subsequent siblings)
17 siblings, 0 replies; 21+ messages in thread
From: Nishanth Aravamudan @ 2005-01-10 20:08 UTC (permalink / raw)
To: kj, lkml
On Mon, Jan 10, 2005 at 05:47:03PM +0100, Domen Puncer wrote:
> Patchset of 171 patches is at http://coderock.org/kj/2.6.10-bk13-kj/
>
> Quick patch summary: about 30 new, 30 merged, 30 dropped.
> Seems like most external trees are merged in -linus, so i'll start
> (re)sending old patches.
<snip>
> msleep_interruptible-drivers_base_dmapool.patch
Please replace with the following patch. msleep_interruptible() is not
appropriate for this delay, as the waitqueue events will be missed.
TASK_UNINTERRUPTIBLE should be used instead of TASK_INTERRUPTIBLE, though, as
signals are not checked for.
Signed-off-by: Nishanth Aravamudan <nacc@us.ibm.com>
--- 2.6.10-v/drivers/base/dmapool.c 2004-12-24 13:35:28.000000000 -0800
+++ 2.6.10/drivers/base/dmapool.c 2005-01-10 12:05:08.000000000 -0800
@@ -293,7 +293,7 @@ restart:
if (mem_flags & __GFP_WAIT) {
DECLARE_WAITQUEUE (wait, current);
- current->state = TASK_INTERRUPTIBLE;
+ set_current_state(TASK_UNINTERRUPTIBLE);
add_wait_queue (&pool->waitq, &wait);
spin_unlock_irqrestore (&pool->lock, flags);
^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: [KJ] [announce] 2.6.10-bk13-kj
2005-01-10 16:47 [announce] 2.6.10-bk13-kj Domen Puncer
` (5 preceding siblings ...)
2005-01-10 20:08 ` [UPDATE PATCH] drivers/dmapool: use TASK_UNINTERRUPTIBLE instead of TASK_INTERRUPTIBLE Nishanth Aravamudan
@ 2005-01-10 20:13 ` Nishanth Aravamudan
2005-01-10 21:14 ` Nishanth Aravamudan
` (10 subsequent siblings)
17 siblings, 0 replies; 21+ messages in thread
From: Nishanth Aravamudan @ 2005-01-10 20:13 UTC (permalink / raw)
To: kj, lkml
On Mon, Jan 10, 2005 at 05:47:03PM +0100, Domen Puncer wrote:
> Patchset of 171 patches is at http://coderock.org/kj/2.6.10-bk13-kj/
>
> Quick patch summary: about 30 new, 30 merged, 30 dropped.
> Seems like most external trees are merged in -linus, so i'll start
> (re)sending old patches.
<snip>
> msleep_interruptible-drivers_block_cciss.patch
Please consider replacing with the following patch:
Description: Use msleep() instead of schedule_timeout() to guarantee the task
delays as expected. TASK_INTERRUPTIBLE is used currently, however signals /
early returns from schedule_timeout() are not checked for. Thus msleep() is more
appropriate.
Signed-off-by: Nishanth Aravamudan <nacc@us.ibm.com>
--- 2.6.10-v/drivers/block/cciss.c 2004-12-24 13:35:39.000000000 -0800
+++ 2.6.10/drivers/block/cciss.c 2005-01-10 12:10:50.000000000 -0800
@@ -2430,8 +2430,7 @@ static int cciss_pci_init(ctlr_info_t *c
scratchpad = readl(c->vaddr + SA5_SCRATCHPAD_OFFSET);
if (scratchpad == CCISS_FIRMWARE_READY)
break;
- set_current_state(TASK_INTERRUPTIBLE);
- schedule_timeout(HZ / 10); /* wait 100ms */
+ msleep(100); /* wait 100ms */
}
if (scratchpad != CCISS_FIRMWARE_READY) {
printk(KERN_WARNING "cciss: Board not ready. Timed out.\n");
^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: [KJ] [announce] 2.6.10-bk13-kj
2005-01-10 16:47 [announce] 2.6.10-bk13-kj Domen Puncer
` (6 preceding siblings ...)
2005-01-10 20:13 ` [KJ] [announce] 2.6.10-bk13-kj Nishanth Aravamudan
@ 2005-01-10 21:14 ` Nishanth Aravamudan
2005-01-10 21:15 ` [UPDATE PATCH] block/pf: replace pf_sleep() with msleep() Nishanth Aravamudan
` (9 subsequent siblings)
17 siblings, 0 replies; 21+ messages in thread
From: Nishanth Aravamudan @ 2005-01-10 21:14 UTC (permalink / raw)
To: kj, lkml
On Mon, Jan 10, 2005 at 05:47:03PM +0100, Domen Puncer wrote:
> Patchset of 171 patches is at http://coderock.org/kj/2.6.10-bk13-kj/
>
> Quick patch summary: about 30 new, 30 merged, 30 dropped.
> Seems like most external trees are merged in -linus, so i'll start
> (re)sending old patches.
<snip>
> msleep_interruptible-drivers_block_pcd.patch
Please consider replacing with the following patch:
Description: Use msleep()/ssleep() instead of schedule_timeout() to guarantee
the task delays as expected. TASK_INTERRUPTIBLE is used in the original code,
however there is no check on the return values / for signals, thus I believe
TASK_UNINTERRUPTIBLE (and hence msleep()) is more appropriate.
Signed-off-by: Nishanth Aravamudan <nacc@us.ibm.com>
--- 2.6.10-v/drivers/block/paride/pcd.c 2004-12-24 13:35:39.000000000 -0800
+++ 2.6.10/drivers/block/paride/pcd.c 2005-01-10 12:20:29.000000000 -0800
@@ -534,12 +534,6 @@ static int pcd_tray_move(struct cdrom_de
position ? "eject" : "close tray");
}
-static void pcd_sleep(int cs)
-{
- current->state = TASK_INTERRUPTIBLE;
- schedule_timeout(cs);
-}
-
static int pcd_reset(struct pcd_unit *cd)
{
int i, k, flg;
@@ -549,11 +543,11 @@ static int pcd_reset(struct pcd_unit *cd
write_reg(cd, 6, 0xa0 + 0x10 * cd->drive);
write_reg(cd, 7, 8);
- pcd_sleep(20 * HZ / 1000); /* delay a bit */
+ msleep(20); /* delay a bit */
k = 0;
while ((k++ < PCD_RESET_TMO) && (status_reg(cd) & IDE_BUSY))
- pcd_sleep(HZ / 10);
+ msleep(100);
flg = 1;
for (i = 0; i < 5; i++)
@@ -592,7 +586,7 @@ static int pcd_ready_wait(struct pcd_uni
if (!(((p & 0xffff) == 0x0402) || ((p & 0xff) == 6)))
return p;
k++;
- pcd_sleep(HZ);
+ ssleep(1);
}
return 0x000020; /* timeout */
}
^ permalink raw reply [flat|nested] 21+ messages in thread
* [UPDATE PATCH] block/pf: replace pf_sleep() with msleep()
2005-01-10 16:47 [announce] 2.6.10-bk13-kj Domen Puncer
` (7 preceding siblings ...)
2005-01-10 21:14 ` Nishanth Aravamudan
@ 2005-01-10 21:15 ` Nishanth Aravamudan
2005-01-10 21:16 ` [UPDATE PATCH] block/pcd: replace pcd_sleep() with msleep()/ssleep() Nishanth Aravamudan
` (8 subsequent siblings)
17 siblings, 0 replies; 21+ messages in thread
From: Nishanth Aravamudan @ 2005-01-10 21:15 UTC (permalink / raw)
To: kj, lkml
On Mon, Jan 10, 2005 at 05:47:03PM +0100, Domen Puncer wrote:
> Patchset of 171 patches is at http://coderock.org/kj/2.6.10-bk13-kj/
>
> Quick patch summary: about 30 new, 30 merged, 30 dropped.
> Seems like most external trees are merged in -linus, so i'll start
> (re)sending old patches.
<snip>
> msleep_interruptible-drivers_block_pf.patch
Please consider replacing with the following patch:
Description: Use msleep() instead of pf_sleep() to guarantee
the task delays as expected. TASK_INTERRUPTIBLE is used in the original code,
however there is no check on the return values / for signals, thus I believe
TASK_UNINTERRUPTIBLE (and hence msleep()) is more appropriate. Remove the
definition of pf_sleep().
Signed-off-by: Nishanth Aravamudan <nacc@us.ibm.com>
--- 2.6.10-v/drivers/block/paride/pf.c 2004-12-24 13:35:01.000000000 -0800
+++ 2.6.10/drivers/block/paride/pf.c 2005-01-10 12:20:20.000000000 -0800
@@ -526,12 +526,6 @@ static void pf_eject(struct pf_unit *pf)
#define PF_RESET_TMO 30 /* in tenths of a second */
-static void pf_sleep(int cs)
-{
- current->state = TASK_INTERRUPTIBLE;
- schedule_timeout(cs);
-}
-
/* the ATAPI standard actually specifies the contents of all 7 registers
after a reset, but the specification is ambiguous concerning the last
two bytes, and different drives interpret the standard differently.
@@ -546,11 +540,11 @@ static int pf_reset(struct pf_unit *pf)
write_reg(pf, 6, 0xa0+0x10*pf->drive);
write_reg(pf, 7, 8);
- pf_sleep(20 * HZ / 1000);
+ msleep(20);
k = 0;
while ((k++ < PF_RESET_TMO) && (status_reg(pf) & STAT_BUSY))
- pf_sleep(HZ / 10);
+ msleep(100);
flg = 1;
for (i = 0; i < 5; i++)
^ permalink raw reply [flat|nested] 21+ messages in thread
* [UPDATE PATCH] block/pcd: replace pcd_sleep() with msleep()/ssleep()
2005-01-10 16:47 [announce] 2.6.10-bk13-kj Domen Puncer
` (8 preceding siblings ...)
2005-01-10 21:15 ` [UPDATE PATCH] block/pf: replace pf_sleep() with msleep() Nishanth Aravamudan
@ 2005-01-10 21:16 ` Nishanth Aravamudan
2005-01-10 21:18 ` [UPDATE PATCH] block/pt: replace pt_sleep() " Nishanth Aravamudan
` (7 subsequent siblings)
17 siblings, 0 replies; 21+ messages in thread
From: Nishanth Aravamudan @ 2005-01-10 21:16 UTC (permalink / raw)
To: kj, lkml
Sorry, slightly inaccurate description...
On Mon, Jan 10, 2005 at 05:47:03PM +0100, Domen Puncer wrote:
> Patchset of 171 patches is at http://coderock.org/kj/2.6.10-bk13-kj/
>
> Quick patch summary: about 30 new, 30 merged, 30 dropped.
> Seems like most external trees are merged in -linus, so i'll start
> (re)sending old patches.
<snip>
> msleep_interruptible-drivers_block_pcd.patch
Please consider replacing with the following patch:
Description: Use msleep()/ssleep() instead of pcd_sleep() to guarantee
the task delays as expected. TASK_INTERRUPTIBLE is used in the original code,
however there is no check on the return values / for signals, thus I believe
TASK_UNINTERRUPTIBLE (and hence msleep()) is more appropriate. Remove definition
of pcd_sleep().
Signed-off-by: Nishanth Aravamudan <nacc@us.ibm.com>
--- 2.6.10-v/drivers/block/paride/pcd.c 2004-12-24 13:35:39.000000000 -0800
+++ 2.6.10/drivers/block/paride/pcd.c 2005-01-10 12:20:29.000000000 -0800
@@ -534,12 +534,6 @@ static int pcd_tray_move(struct cdrom_de
position ? "eject" : "close tray");
}
-static void pcd_sleep(int cs)
-{
- current->state = TASK_INTERRUPTIBLE;
- schedule_timeout(cs);
-}
-
static int pcd_reset(struct pcd_unit *cd)
{
int i, k, flg;
@@ -549,11 +543,11 @@ static int pcd_reset(struct pcd_unit *cd
write_reg(cd, 6, 0xa0 + 0x10 * cd->drive);
write_reg(cd, 7, 8);
- pcd_sleep(20 * HZ / 1000); /* delay a bit */
+ msleep(20); /* delay a bit */
k = 0;
while ((k++ < PCD_RESET_TMO) && (status_reg(cd) & IDE_BUSY))
- pcd_sleep(HZ / 10);
+ msleep(100);
flg = 1;
for (i = 0; i < 5; i++)
@@ -592,7 +586,7 @@ static int pcd_ready_wait(struct pcd_uni
if (!(((p & 0xffff) == 0x0402) || ((p & 0xff) == 6)))
return p;
k++;
- pcd_sleep(HZ);
+ ssleep(1);
}
return 0x000020; /* timeout */
}
^ permalink raw reply [flat|nested] 21+ messages in thread
* [UPDATE PATCH] block/pt: replace pt_sleep() with msleep()/ssleep()
2005-01-10 16:47 [announce] 2.6.10-bk13-kj Domen Puncer
` (9 preceding siblings ...)
2005-01-10 21:16 ` [UPDATE PATCH] block/pcd: replace pcd_sleep() with msleep()/ssleep() Nishanth Aravamudan
@ 2005-01-10 21:18 ` Nishanth Aravamudan
2005-01-10 21:20 ` [UPDATE PATCH] block/pg: replace pg_sleep() with msleep() Nishanth Aravamudan
` (6 subsequent siblings)
17 siblings, 0 replies; 21+ messages in thread
From: Nishanth Aravamudan @ 2005-01-10 21:18 UTC (permalink / raw)
To: kj, lkml
Sorry, slightly inaccurate description...
On Mon, Jan 10, 2005 at 05:47:03PM +0100, Domen Puncer wrote:
> Patchset of 171 patches is at http://coderock.org/kj/2.6.10-bk13-kj/
>
> Quick patch summary: about 30 new, 30 merged, 30 dropped.
> Seems like most external trees are merged in -linus, so i'll start
> (re)sending old patches.
<snip>
> msleep_interruptible-drivers_block_pt.patch
Please consider replacing with the following patch:
Description: Use msleep()/ssleep() instead of pt_sleep() to guarantee
the task delays as expected. TASK_INTERRUPTIBLE is used in the original code,
however there is no check on the return values / for signals, thus I believe
TASK_UNINTERRUPTIBLE (and hence msleep()) is more appropriate. Remove definition
of pt_sleep(). Change the units of the pause variable in pt_poll_dsc() to msecs,
thus allowing the use of msleep(). Appropriately modify the three callers of
pt_poll_dsc().
Signed-off-by: Nishanth Aravamudan <nacc@us.ibm.com>
--- 2.6.10-v/drivers/block/paride/pt.c 2004-12-24 13:34:27.000000000 -0800
+++ 2.6.10/drivers/block/paride/pt.c 2005-01-10 12:23:43.000000000 -0800
@@ -401,12 +401,6 @@ static int pt_atapi(struct pt_unit *tape
return r;
}
-static void pt_sleep(int cs)
-{
- current->state = TASK_INTERRUPTIBLE;
- schedule_timeout(cs);
-}
-
static int pt_poll_dsc(struct pt_unit *tape, int pause, int tmo, char *msg)
{
struct pi_adapter *pi = tape->pi;
@@ -416,7 +410,7 @@ static int pt_poll_dsc(struct pt_unit *t
e = 0;
s = 0;
while (k < tmo) {
- pt_sleep(pause);
+ msleep(pause);
k++;
pi_connect(pi);
write_reg(pi, 6, DRIVE(tape));
@@ -445,7 +439,7 @@ static void pt_media_access_cmd(struct p
return;
}
pi_disconnect(tape->pi);
- pt_poll_dsc(tape, HZ, tmo, fun);
+ pt_poll_dsc(tape, 1000, tmo, fun);
}
static void pt_rewind(struct pt_unit *tape)
@@ -474,11 +468,11 @@ static int pt_reset(struct pt_unit *tape
write_reg(pi, 6, DRIVE(tape));
write_reg(pi, 7, 8);
- pt_sleep(20 * HZ / 1000);
+ msleep(20);
k = 0;
while ((k++ < PT_RESET_TMO) && (status_reg(pi) & STAT_BUSY))
- pt_sleep(HZ / 10);
+ msleep(100);
flg = 1;
for (i = 0; i < 5; i++)
@@ -512,7 +506,7 @@ static int pt_ready_wait(struct pt_unit
if (!(((p & 0xffff) == 0x0402) || ((p & 0xff) == 6)))
return p;
k++;
- pt_sleep(HZ);
+ ssleep(1);
}
return 0x000020; /* timeout */
}
@@ -785,7 +779,7 @@ static ssize_t pt_read(struct file *filp
while (count > 0) {
- if (!pt_poll_dsc(tape, HZ / 100, PT_TMO, "read"))
+ if (!pt_poll_dsc(tape, 10, PT_TMO, "read"))
return -EIO;
n = count;
@@ -886,7 +880,7 @@ static ssize_t pt_write(struct file *fil
while (count > 0) {
- if (!pt_poll_dsc(tape, HZ / 100, PT_TMO, "write"))
+ if (!pt_poll_dsc(tape, 10, PT_TMO, "write"))
return -EIO;
n = count;
^ permalink raw reply [flat|nested] 21+ messages in thread
* [UPDATE PATCH] block/pg: replace pg_sleep() with msleep()
2005-01-10 16:47 [announce] 2.6.10-bk13-kj Domen Puncer
` (10 preceding siblings ...)
2005-01-10 21:18 ` [UPDATE PATCH] block/pt: replace pt_sleep() " Nishanth Aravamudan
@ 2005-01-10 21:20 ` Nishanth Aravamudan
2005-01-10 21:27 ` [UPDATE PATCH] cdrom/sonycd535: replace schedule_timeout() " Nishanth Aravamudan
` (5 subsequent siblings)
17 siblings, 0 replies; 21+ messages in thread
From: Nishanth Aravamudan @ 2005-01-10 21:20 UTC (permalink / raw)
To: kj, lkml
Sorry, slightly inaccurate description...
On Mon, Jan 10, 2005 at 05:47:03PM +0100, Domen Puncer wrote:
> Patchset of 171 patches is at http://coderock.org/kj/2.6.10-bk13-kj/
>
> Quick patch summary: about 30 new, 30 merged, 30 dropped.
> Seems like most external trees are merged in -linus, so i'll start
> (re)sending old patches.
<snip>
> msleep_interruptible-drivers_block_pg.patch
Please consider replacing with the following patch:
Description: Use msleep()/ssleep() instead of pg_sleep() to guarantee
the task delays as expected. TASK_INTERRUPTIBLE is used in the original code,
however there is no check on the return values / for signals, thus I believe
TASK_UNINTERRUPTIBLE (and hence msleep()) is more appropriate. Change pg_sleep()
to use TASK_UNINTERRUPTIBLE as well.
Signed-off-by: Nishanth Aravamudan <nacc@us.ibm.com>
--- 2.6.10-v/drivers/block/paride/pg.c 2004-12-24 13:35:25.000000000 -0800
+++ 2.6.10/drivers/block/paride/pg.c 2005-01-10 12:21:34.000000000 -0800
@@ -295,7 +295,7 @@ static inline u8 DRIVE(struct pg *dev)
static void pg_sleep(int cs)
{
- current->state = TASK_INTERRUPTIBLE;
+ set_current_state(TASK_UNINTERRUPTIBLE);
schedule_timeout(cs);
}
@@ -409,7 +409,7 @@ static int pg_reset(struct pg *dev)
write_reg(dev, 6, DRIVE(dev));
write_reg(dev, 7, 8);
- pg_sleep(20 * HZ / 1000);
+ msleep(20);
k = 0;
while ((k++ < PG_RESET_TMO) && (status_reg(dev) & STAT_BUSY))
^ permalink raw reply [flat|nested] 21+ messages in thread
* [UPDATE PATCH] cdrom/sonycd535: replace schedule_timeout() with msleep()
2005-01-10 16:47 [announce] 2.6.10-bk13-kj Domen Puncer
` (11 preceding siblings ...)
2005-01-10 21:20 ` [UPDATE PATCH] block/pg: replace pg_sleep() with msleep() Nishanth Aravamudan
@ 2005-01-10 21:27 ` Nishanth Aravamudan
2005-01-10 23:12 ` [UPDATE PATCH] message/mptbase: replace schedule_timeout() with ssleep() Nishanth Aravamudan
` (4 subsequent siblings)
17 siblings, 0 replies; 21+ messages in thread
From: Nishanth Aravamudan @ 2005-01-10 21:27 UTC (permalink / raw)
To: kj, lkml
On Mon, Jan 10, 2005 at 05:47:03PM +0100, Domen Puncer wrote:
> Patchset of 171 patches is at http://coderock.org/kj/2.6.10-bk13-kj/
>
> Quick patch summary: about 30 new, 30 merged, 30 dropped.
> Seems like most external trees are merged in -linus, so i'll start
> (re)sending old patches.
<snip>
> msleep_interruptible-drivers_cdrom_sonycd535.patch
> msleep_interruptible-drivers_cdrom_sonycd535_2.patch
These two patches are combined in the following, please replace.
Description: Use msleep() instead of schedule_timeout() to guarantee the task
delays as expected. Although TASK_INTERRUPTIBLE is used in the original code,
the schedule_timeout() return conditions for such a state are not checked
appropriately; therefore, TASK_UNINTERRUPTIBLE should be ok (and, hence,
msleep()).
Signed-off-by: Nishanth Aravamudan <nacc@us.ibm.com>
--- 2.6.10-v/drivers/cdrom/sonycd535.c 2004-12-24 13:35:50.000000000 -0800
+++ 2.6.10/drivers/cdrom/sonycd535.c 2005-01-06 10:18:47.000000000 -0800
@@ -129,6 +129,7 @@
#include <linux/mm.h>
#include <linux/slab.h>
#include <linux/init.h>
+#include <linux/delay.h>
#define REALLY_SLOW_IO
#include <asm/system.h>
@@ -896,9 +897,8 @@ do_cdu535_request(request_queue_t * q)
}
if (readStatus == BAD_STATUS) {
/* Sleep for a while, then retry */
- set_current_state(TASK_INTERRUPTIBLE);
spin_unlock_irq(&sonycd535_lock);
- schedule_timeout(RETRY_FOR_BAD_STATUS*HZ/10);
+ msleep(RETRY_FOR_BAD_STATUS*100);
spin_lock_irq(&sonycd535_lock);
}
#if DEBUG > 0
@@ -1478,8 +1478,7 @@ static int __init sony535_init(void)
/* look for the CD-ROM, follows the procedure in the DOS driver */
inb(select_unit_reg);
/* wait for 40 18 Hz ticks (reverse-engineered from DOS driver) */
- set_current_state(TASK_INTERRUPTIBLE);
- schedule_timeout((HZ+17)*40/18);
+ msleep(2222);
inb(result_reg);
outb(0, read_status_reg); /* does a reset? */
^ permalink raw reply [flat|nested] 21+ messages in thread
* [UPDATE PATCH] message/mptbase: replace schedule_timeout() with ssleep()
2005-01-10 16:47 [announce] 2.6.10-bk13-kj Domen Puncer
` (12 preceding siblings ...)
2005-01-10 21:27 ` [UPDATE PATCH] cdrom/sonycd535: replace schedule_timeout() " Nishanth Aravamudan
@ 2005-01-10 23:12 ` Nishanth Aravamudan
2005-01-11 0:39 ` [UPDATE PATCH] net/sb1000: replace nicedelay() " Nishanth Aravamudan
` (3 subsequent siblings)
17 siblings, 0 replies; 21+ messages in thread
From: Nishanth Aravamudan @ 2005-01-10 23:12 UTC (permalink / raw)
To: kj, lkml
On Mon, Jan 10, 2005 at 05:47:03PM +0100, Domen Puncer wrote:
> Patchset of 171 patches is at http://coderock.org/kj/2.6.10-bk13-kj/
>
> Quick patch summary: about 30 new, 30 merged, 30 dropped.
> Seems like most external trees are merged in -linus, so i'll start
> (re)sending old patches.
<snip>
> msleep_interruptible-drivers_message_fusion_mptbase.patch
Please consider replacing with the following patch:
Description: Use ssleep() instead of schedule_timeout() to guarantee
the task delays as expected. The original code does use TASK_INTERRUPTIBLE, but
does not check for signals or early return from schedule_timeout() so ssleep()
seems more appropriate.
Signed-off-by: Nishanth Aravamudan <nacc@us.ibm.com>
--- 2.6.10-v/drivers/message/fusion/mptbase.c 2004-12-24 13:35:50.000000000 -0800
+++ 2.6.10/drivers/message/fusion/mptbase.c 2005-01-05 14:23:05.000000000 -0800
@@ -3137,8 +3137,7 @@ mpt_diag_reset(MPT_ADAPTER *ioc, int ign
/* wait 1 sec */
if (sleepFlag == CAN_SLEEP) {
- set_current_state(TASK_INTERRUPTIBLE);
- schedule_timeout(1000 * HZ / 1000);
+ ssleep(1);
} else {
mdelay (1000);
}
^ permalink raw reply [flat|nested] 21+ messages in thread
* [UPDATE PATCH] net/sb1000: replace nicedelay() with ssleep()
2005-01-10 16:47 [announce] 2.6.10-bk13-kj Domen Puncer
` (13 preceding siblings ...)
2005-01-10 23:12 ` [UPDATE PATCH] message/mptbase: replace schedule_timeout() with ssleep() Nishanth Aravamudan
@ 2005-01-11 0:39 ` Nishanth Aravamudan
2005-01-11 3:56 ` Jeff Garzik
2005-01-11 0:42 ` [UPDATE PATCH] net/slip: replace schedule_timeout() with msleep() Nishanth Aravamudan
` (2 subsequent siblings)
17 siblings, 1 reply; 21+ messages in thread
From: Nishanth Aravamudan @ 2005-01-11 0:39 UTC (permalink / raw)
To: kj, lkml
On Mon, Jan 10, 2005 at 05:47:03PM +0100, Domen Puncer wrote:
> Patchset of 171 patches is at http://coderock.org/kj/2.6.10-bk13-kj/
>
> Quick patch summary: about 30 new, 30 merged, 30 dropped.
> Seems like most external trees are merged in -linus, so i'll start
> (re)sending old patches.
<snip>
> msleep_interruptible-drivers_net_sb1000.patch
Please consider replacing with the following:
Description: Use ssleep() instead of nicedelay()
to guarantee the task delays as expected. Remove the prototype and
definition of nicedelay(). This is a very weird function, because it is
called to sleep in terms of usecs, but always sleeps for 1 second,
completely ignoring the parameter. I have gone ahead and followed suit,
just sleeping for a second in all cases, but maybe someone with the
hardware could tell me if perhaps the paramter *should* matter. Additionally,
nicedelay() is called in TASK_INTERRUPTIBLE state, but doesn't deal with signals
in case these longer delays do not complete, so I believe ssleep() is more
appropriate.
Signed-off-by: Nishanth Aravamudan <nacc@us.ibm.com>
--- 2.6.10-v/drivers/net/sb1000.c 2004-12-24 13:33:51.000000000 -0800
+++ 2.6.10/drivers/net/sb1000.c 2005-01-05 14:23:05.000000000 -0800
@@ -90,7 +90,6 @@ static int sb1000_close(struct net_devic
/* SB1000 hardware routines to be used during open/configuration phases */
-static inline void nicedelay(unsigned long usecs);
static inline int card_wait_for_busy_clear(const int ioaddr[],
const char* name);
static inline int card_wait_for_ready(const int ioaddr[], const char* name,
@@ -254,13 +253,6 @@ static struct pnp_driver sb1000_driver =
const int TimeOutJiffies = (875 * HZ) / 100;
-static inline void nicedelay(unsigned long usecs)
-{
- current->state = TASK_INTERRUPTIBLE;
- schedule_timeout(HZ);
- return;
-}
-
/* Card Wait For Busy Clear (cannot be used during an interrupt) */
static inline int
card_wait_for_busy_clear(const int ioaddr[], const char* name)
@@ -475,7 +467,7 @@ sb1000_reset(const int ioaddr[], const c
udelay(1000);
outb(0x0, port);
inb(port);
- nicedelay(60000);
+ ssleep(1);
outb(0x4, port);
inb(port);
udelay(1000);
@@ -537,7 +529,7 @@ sb1000_activate(const int ioaddr[], cons
const unsigned char Command0[6] = {0x80, 0x11, 0x00, 0x00, 0x00, 0x00};
const unsigned char Command1[6] = {0x80, 0x16, 0x00, 0x00, 0x00, 0x00};
- nicedelay(50000);
+ ssleep(1);
if ((status = card_send_command(ioaddr, name, Command0, st)))
return status;
if ((status = card_send_command(ioaddr, name, Command1, st)))
@@ -944,7 +936,7 @@ sb1000_open(struct net_device *dev)
/* initialize sb1000 */
if ((status = sb1000_reset(ioaddr, name)))
return status;
- nicedelay(200000);
+ ssleep(1);
if ((status = sb1000_check_CRC(ioaddr, name)))
return status;
^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: [UPDATE PATCH] net/sb1000: replace nicedelay() with ssleep()
2005-01-11 0:39 ` [UPDATE PATCH] net/sb1000: replace nicedelay() " Nishanth Aravamudan
@ 2005-01-11 3:56 ` Jeff Garzik
2005-01-11 4:10 ` [KJ] " Nish Aravamudan
0 siblings, 1 reply; 21+ messages in thread
From: Jeff Garzik @ 2005-01-11 3:56 UTC (permalink / raw)
To: Nishanth Aravamudan; +Cc: kj, lkml
Nishanth Aravamudan wrote:
> @@ -475,7 +467,7 @@ sb1000_reset(const int ioaddr[], const c
> udelay(1000);
> outb(0x0, port);
> inb(port);
> - nicedelay(60000);
> + ssleep(1);
> outb(0x4, port);
> inb(port);
> udelay(1000);
> @@ -537,7 +529,7 @@ sb1000_activate(const int ioaddr[], cons
> const unsigned char Command0[6] = {0x80, 0x11, 0x00, 0x00, 0x00, 0x00};
> const unsigned char Command1[6] = {0x80, 0x16, 0x00, 0x00, 0x00, 0x00};
>
> - nicedelay(50000);
> + ssleep(1);
> if ((status = card_send_command(ioaddr, name, Command0, st)))
> return status;
> if ((status = card_send_command(ioaddr, name, Command1, st)))
> @@ -944,7 +936,7 @@ sb1000_open(struct net_device *dev)
> /* initialize sb1000 */
> if ((status = sb1000_reset(ioaddr, name)))
> return status;
> - nicedelay(200000);
> + ssleep(1);
> if ((status = sb1000_check_CRC(ioaddr, name)))
> return status;
Your conversion of nicedelay() -> ssleep() values is imprecise.
The author clearly intended the values to be different, right?
Jeff
^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: [KJ] Re: [UPDATE PATCH] net/sb1000: replace nicedelay() with ssleep()
2005-01-11 3:56 ` Jeff Garzik
@ 2005-01-11 4:10 ` Nish Aravamudan
0 siblings, 0 replies; 21+ messages in thread
From: Nish Aravamudan @ 2005-01-11 4:10 UTC (permalink / raw)
To: Jeff Garzik; +Cc: Nishanth Aravamudan, kj, lkml
On Mon, 10 Jan 2005 22:56:31 -0500, Jeff Garzik <jgarzik@pobox.com> wrote:
> Nishanth Aravamudan wrote:
> > @@ -475,7 +467,7 @@ sb1000_reset(const int ioaddr[], const c
> > udelay(1000);
> > outb(0x0, port);
> > inb(port);
> > - nicedelay(60000);
> > + ssleep(1);
> > outb(0x4, port);
> > inb(port);
> > udelay(1000);
> > @@ -537,7 +529,7 @@ sb1000_activate(const int ioaddr[], cons
> > const unsigned char Command0[6] = {0x80, 0x11, 0x00, 0x00, 0x00, 0x00};
> > const unsigned char Command1[6] = {0x80, 0x16, 0x00, 0x00, 0x00, 0x00};
> >
> > - nicedelay(50000);
> > + ssleep(1);
> > if ((status = card_send_command(ioaddr, name, Command0, st)))
> > return status;
> > if ((status = card_send_command(ioaddr, name, Command1, st)))
> > @@ -944,7 +936,7 @@ sb1000_open(struct net_device *dev)
> > /* initialize sb1000 */
> > if ((status = sb1000_reset(ioaddr, name)))
> > return status;
> > - nicedelay(200000);
> > + ssleep(1);
> > if ((status = sb1000_check_CRC(ioaddr, name)))
> > return status;
>
>
> Your conversion of nicedelay() -> ssleep() values is imprecise.
True, but this is what I attempted to allude to in the description of the patch:
> > Remove the prototype and
> > definition of nicedelay(). This is a very weird function, because it is
> > called to sleep in terms of usecs, but always sleeps for 1 second,
> > completely ignoring the parameter. I have gone ahead and followed suit,
> > just sleeping for a second in all cases, but maybe someone with the
> > hardware could tell me if perhaps the paramter *should* matter.
> The author clearly intended the values to be different, right?
Since I'm not the author, I'm not certain whether you are right or
not. I was honestly very confused by nicedelay(). It is called with
various 600000, 500000, 200000 usecs, but the function currently
always requests a 1000000 usec delay (a full second of interruptible
sleep). It just doesn't make any sense... I have sent messages
regarding this function several times (and patches have existed for a
while), but no one has had any comment. I appreciate your input
greatly. What do you think?
Thanks,
Nish
^ permalink raw reply [flat|nested] 21+ messages in thread
* [UPDATE PATCH] net/slip: replace schedule_timeout() with msleep()
2005-01-10 16:47 [announce] 2.6.10-bk13-kj Domen Puncer
` (14 preceding siblings ...)
2005-01-11 0:39 ` [UPDATE PATCH] net/sb1000: replace nicedelay() " Nishanth Aravamudan
@ 2005-01-11 0:42 ` Nishanth Aravamudan
2005-01-11 0:56 ` [UPDATE PATCH] sbus/envctrl: replace schedule_timeout() with msleep_interruptible() Nishanth Aravamudan
2005-01-11 1:00 ` [UPDATE PATCH] scsi/st: " Nishanth Aravamudan
17 siblings, 0 replies; 21+ messages in thread
From: Nishanth Aravamudan @ 2005-01-11 0:42 UTC (permalink / raw)
To: kj, lkml
On Mon, Jan 10, 2005 at 05:47:03PM +0100, Domen Puncer wrote:
> Patchset of 171 patches is at http://coderock.org/kj/2.6.10-bk13-kj/
>
> Quick patch summary: about 30 new, 30 merged, 30 dropped.
> Seems like most external trees are merged in -linus, so i'll start
> (re)sending old patches.
<snip>
> msleep_interruptible-drivers_net_slip.patch
Please consider replacing with the following:
Description: Use msleep() instead of schedule_timeout() to guarantee
the task delays as expected. While the original code does use
TASK_INTERRUPTIBLE, it does not check for signals, so I believe msleep() is more
appropriate.
Signed-off-by: Nishanth Aravamudan <nacc@us.ibm.com>
--- 2.6.10-v/drivers/net/slip.c 2004-12-24 13:35:49.000000000 -0800
+++ 2.6.10/drivers/net/slip.c 2005-01-05 14:23:05.000000000 -0800
@@ -75,6 +75,7 @@
#include <linux/if_arp.h>
#include <linux/if_slip.h>
#include <linux/init.h>
+#include <linux/delay.h>
#include "slip.h"
#ifdef CONFIG_INET
#include <linux/ip.h>
@@ -1395,10 +1396,8 @@ static void __exit slip_exit(void)
/* First of all: check for active disciplines and hangup them.
*/
do {
- if (busy) {
- set_current_state(TASK_INTERRUPTIBLE);
- schedule_timeout(HZ / 10);
- }
+ if (busy)
+ msleep(100);
busy = 0;
for (i = 0; i < slip_maxdev; i++) {
^ permalink raw reply [flat|nested] 21+ messages in thread
* [UPDATE PATCH] sbus/envctrl: replace schedule_timeout() with msleep_interruptible()
2005-01-10 16:47 [announce] 2.6.10-bk13-kj Domen Puncer
` (15 preceding siblings ...)
2005-01-11 0:42 ` [UPDATE PATCH] net/slip: replace schedule_timeout() with msleep() Nishanth Aravamudan
@ 2005-01-11 0:56 ` Nishanth Aravamudan
2005-01-11 1:00 ` [UPDATE PATCH] scsi/st: " Nishanth Aravamudan
17 siblings, 0 replies; 21+ messages in thread
From: Nishanth Aravamudan @ 2005-01-11 0:56 UTC (permalink / raw)
To: kj, lkml
On Mon, Jan 10, 2005 at 05:47:03PM +0100, Domen Puncer wrote:
> Patchset of 171 patches is at http://coderock.org/kj/2.6.10-bk13-kj/
>
> Quick patch summary: about 30 new, 30 merged, 30 dropped.
> Seems like most external trees are merged in -linus, so i'll start
> (re)sending old patches.
<snip>
> msleep_interruptible-drivers_sbus_char_envctrl.patch
Please consider updating to the following patch:
Description: Use msleep_interruptible() instead of
schedule_timeout() to guarantee the task delays as expected. Change the units of
poll_interval to msecs as it is only used in this delay.
Signed-off-by: Nishanth Aravamudan <nacc@us.ibm.com>
--- 2.6.10-v/drivers/sbus/char/envctrl.c 2004-12-24 13:34:01.000000000 -0800
+++ 2.6.10/drivers/sbus/char/envctrl.c 2005-01-05 14:23:05.000000000 -0800
@@ -1007,7 +1007,7 @@ static int kenvctrld(void *__unused)
return -ENODEV;
}
- poll_interval = 5 * HZ; /* TODO env_mon_interval */
+ poll_interval = 5000; /* TODO env_mon_interval */
daemonize("kenvctrld");
allow_signal(SIGKILL);
@@ -1016,10 +1016,7 @@ static int kenvctrld(void *__unused)
printk(KERN_INFO "envctrl: %s starting...\n", current->comm);
for (;;) {
- current->state = TASK_INTERRUPTIBLE;
- schedule_timeout(poll_interval);
-
- if(signal_pending(current))
+ if(msleep_interruptible(poll_interval))
break;
for (whichcpu = 0; whichcpu < ENVCTRL_MAX_CPU; ++whichcpu) {
^ permalink raw reply [flat|nested] 21+ messages in thread
* [UPDATE PATCH] scsi/st: replace schedule_timeout() with msleep_interruptible()
2005-01-10 16:47 [announce] 2.6.10-bk13-kj Domen Puncer
` (16 preceding siblings ...)
2005-01-11 0:56 ` [UPDATE PATCH] sbus/envctrl: replace schedule_timeout() with msleep_interruptible() Nishanth Aravamudan
@ 2005-01-11 1:00 ` Nishanth Aravamudan
17 siblings, 0 replies; 21+ messages in thread
From: Nishanth Aravamudan @ 2005-01-11 1:00 UTC (permalink / raw)
To: kj, lkml
On Mon, Jan 10, 2005 at 05:47:03PM +0100, Domen Puncer wrote:
> Patchset of 171 patches is at http://coderock.org/kj/2.6.10-bk13-kj/
>
> Quick patch summary: about 30 new, 30 merged, 30 dropped.
> Seems like most external trees are merged in -linus, so i'll start
> (re)sending old patches.
<snip>
> msleep_interruptible-drivers_scsi_st.patch
Please consider updating to the following patch:
Description: Use msleep_interruptible() instead of
schedule_timeout() to guarantee the task delays as expected.
Signed-off-by: Nishanth Aravamudan <nacc@us.ibm.com>
--- 2.6.10-v/drivers/scsi/st.c 2004-12-24 13:35:01.000000000 -0800
+++ 2.6.10/drivers/scsi/st.c 2005-01-05 14:23:05.000000000 -0800
@@ -36,6 +36,7 @@ static char *verstr = "20041025";
#include <linux/moduleparam.h>
#include <linux/devfs_fs_kernel.h>
#include <linux/cdev.h>
+#include <linux/delay.h>
#include <asm/uaccess.h>
#include <asm/dma.h>
#include <asm/system.h>
@@ -760,9 +761,7 @@ static int test_ready(struct scsi_tape *
if (scode == NOT_READY) {
if (waits < max_wait) {
- set_current_state(TASK_INTERRUPTIBLE);
- schedule_timeout(HZ);
- if (signal_pending(current)) {
+ if (msleep_interruptible(1000)) {
retval = (-EINTR);
break;
}
^ permalink raw reply [flat|nested] 21+ messages in thread