* [UPDATE PATCH] scsi/osst: replace schedule_timeout() with msleep()
2005-01-10 16:47 [KJ] [announce] 2.6.10-bk13-kj Domen Puncer
@ 2005-01-10 18:19 ` Nishanth Aravamudan
2005-01-10 18:23 ` Nishanth Aravamudan
1 sibling, 0 replies; 5+ 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] 5+ messages in thread
* [UPDATE PATCH] scsi/osst: replace schedule_timeout() with msleep()
2005-01-10 16:47 [KJ] [announce] 2.6.10-bk13-kj Domen Puncer
2005-01-10 18:19 ` [UPDATE PATCH] scsi/osst: replace schedule_timeout() with msleep() Nishanth Aravamudan
@ 2005-01-10 18:23 ` Nishanth Aravamudan
1 sibling, 0 replies; 5+ 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] 5+ messages in thread
* [patch 1/1] scsi/osst: replace schedule_timeout() with msleep()
@ 2005-03-06 22:27 domen
2005-03-06 22:42 ` Willem Riede
0 siblings, 1 reply; 5+ messages in thread
From: domen @ 2005-03-06 22:27 UTC (permalink / raw)
To: osst; +Cc: linux-scsi, domen, nacc
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>
Signed-off-by: Domen Puncer <domen@coderock.org>
---
kj-domen/drivers/scsi/osst.c | 5 ++---
1 files changed, 2 insertions(+), 3 deletions(-)
diff -puN drivers/scsi/osst.c~msleep-drivers_scsi_osst drivers/scsi/osst.c
--- kj/drivers/scsi/osst.c~msleep-drivers_scsi_osst 2005-03-05 16:10:51.000000000 +0100
+++ kj-domen/drivers/scsi/osst.c 2005-03-05 16:10:51.000000000 +0100
@@ -1558,8 +1558,7 @@ static int osst_reposition_and_retry(str
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
@@ -1621,7 +1620,7 @@ static int osst_reposition_and_retry(str
}
#endif
set_current_state(TASK_INTERRUPTIBLE);
- 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] 5+ messages in thread
* Re: [patch 1/1] scsi/osst: replace schedule_timeout() with msleep()
2005-03-06 22:27 [patch 1/1] scsi/osst: replace schedule_timeout() with msleep() domen
@ 2005-03-06 22:42 ` Willem Riede
2005-03-07 23:05 ` [UPDATE PATCH] " Nishanth Aravamudan
0 siblings, 1 reply; 5+ messages in thread
From: Willem Riede @ 2005-03-06 22:42 UTC (permalink / raw)
Cc: linux-scsi, domen, nacc
On 03/06/2005 05:27:41 PM, domen@coderock.org wrote:
>
>
> 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().
This change is a total don't-care as far as I'm concerned. But if we are going to
make it, can we please be consistent? Does the "set_current_state(TASK_INTERRUPTIBLE)"
stay or go? The two changes below don't agree in that respect.
---
> attempts--;
> - set_current_state(TASK_INTERRUPTIBLE);
> - schedule_timeout(HZ / 10);
> + msleep(100);
> }
---
> #endif
> set_current_state(TASK_INTERRUPTIBLE);
> - schedule_timeout(HZ / 10);
> + msleep(100);
> }
---
Regards, Willem Riede,
osst maintainer.
^ permalink raw reply [flat|nested] 5+ messages in thread
* [UPDATE PATCH] scsi/osst: replace schedule_timeout() with msleep()
2005-03-06 22:42 ` Willem Riede
@ 2005-03-07 23:05 ` Nishanth Aravamudan
0 siblings, 0 replies; 5+ messages in thread
From: Nishanth Aravamudan @ 2005-03-07 23:05 UTC (permalink / raw)
To: Willem Riede; +Cc: domen, linux-scsi
On Sun, Mar 06, 2005 at 10:42:55PM +0000, Willem Riede wrote:
> On 03/06/2005 05:27:41 PM, domen@coderock.org wrote:
> >
> >
> > 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().
>
> This change is a total don't-care as far as I'm concerned. But if we are going to
> make it, can we please be consistent? Does the "set_current_state(TASK_INTERRUPTIBLE)"
> stay or go? The two changes below don't agree in that respect.
You are completely correct. Please excuse the sloppy patch, fixed below.
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.11-v/drivers/scsi/osst.c 2005-03-01 23:38:08.000000000 -0800
+++ 2.6.11/drivers/scsi/osst.c 2005-03-07 15:01:38.000000000 -0800
@@ -862,8 +862,7 @@ static int osst_recover_wait_frame(struc
retval = osst_write_error_recovery(STp, aSRpnt, 0);
break;
}
- set_current_state(TASK_INTERRUPTIBLE);
- schedule_timeout (HZ / OSST_POLL_PER_SEC);
+ msleep(1000 / OSST_POLL_PER_SEC);
STp->buffer->b_data = mybuf; STp->buffer->buffer_size = 24;
memset(cmd, 0, MAX_COMMAND_SIZE);
@@ -1558,8 +1557,7 @@ static int osst_reposition_and_retry(str
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
@@ -1620,8 +1618,7 @@ static int osst_reposition_and_retry(str
debugging = 0;
}
#endif
- set_current_state(TASK_INTERRUPTIBLE);
- 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] 5+ messages in thread
end of thread, other threads:[~2005-03-07 23:05 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-03-06 22:27 [patch 1/1] scsi/osst: replace schedule_timeout() with msleep() domen
2005-03-06 22:42 ` Willem Riede
2005-03-07 23:05 ` [UPDATE PATCH] " Nishanth Aravamudan
-- strict thread matches above, loose matches on Subject: below --
2005-01-10 16:47 [KJ] [announce] 2.6.10-bk13-kj Domen Puncer
2005-01-10 18:19 ` [UPDATE PATCH] scsi/osst: replace schedule_timeout() with msleep() Nishanth Aravamudan
2005-01-10 18:23 ` Nishanth Aravamudan
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.