* [-mm PATCH 0/32] fix-up schedule_timeout() usage
@ 2005-08-15 18:05 Nishanth Aravamudan
2005-08-15 18:06 ` [-mm PATCH 1/32] include: update jiffies/{m,u}secs conversion functions Nishanth Aravamudan
` (17 more replies)
0 siblings, 18 replies; 30+ messages in thread
From: Nishanth Aravamudan @ 2005-08-15 18:05 UTC (permalink / raw)
To: akpm; +Cc: linux-kernel
Hello Andrew,
Sorry for the lack of a combined To:/Cc: list, but it would have been
excessive if I included everyone (I won't send all of the patches to
LKML, unless there is no other list entry in MAINTAINERS - I think that
is only 9 out of the 32 patches :)
Andrew recently added schedule_timeout_interruptible() and
schedule_timeout_uninterruptible() to the -mm tree, as
schedule_timeout() called without the state set results in an immediate
return; thus, it makes little sense to ever call it that way. Almost all
the kernel invocations of schedule_timeout(), additionally, follow:
set_current_state(TASK_{,UN}INTERRUPTIBLE);
schedule_timeout(some_value_in_jiffies);
Andrew pointed out that creating non-inline wrappers for this common
usage should reduce the kernel size. The following 32 patches (split up
by directory/subsystem) convert the schedule_timeout() callers in
2.6.13-rc5-mm1, where appropriate.
Here's the list of patches as I split them up:
01/32: include/
02/32: fs/
03/32: kernel/
04/32: mm/
05/32: net/
06/32: sound/
07/32: arch/alpha
08/32: arch/i386
09/32: arch/ia64
10/32: arch/m68k
11/32: arch/mips
12/32: arch/ppc
13/32: arch/ppc64
14/32: arch/um
15/32: drivers/acpi
16/32: drivers/block
17/32: drivers/cdrom
18/32: drivers/char
19/32: drivers/dlm
20/32: drivers/net
21/32: drivers/ieee1394
22/32: drivers/isdn
23/32: drivers/macintosh
24/32: drivers/md
25/32: drivers/media
26/32: drivers/message
27/32: drivers/parport
28/32: drivers/sbus
29/32: drivers/scsi
30/32: drivers/serial
31/32: drivers/telephony
32/32: drivers/usb
Thanks,
Nish
^ permalink raw reply [flat|nested] 30+ messages in thread
* [-mm PATCH 1/32] include: update jiffies/{m,u}secs conversion functions
2005-08-15 18:05 [-mm PATCH 0/32] fix-up schedule_timeout() usage Nishanth Aravamudan
@ 2005-08-15 18:06 ` Nishanth Aravamudan
2005-08-17 23:35 ` Andrew Morton
2005-08-15 18:08 ` [-mm PATCH 2/32] fs: fix-up schedule_timeout() usage Nishanth Aravamudan
` (16 subsequent siblings)
17 siblings, 1 reply; 30+ messages in thread
From: Nishanth Aravamudan @ 2005-08-15 18:06 UTC (permalink / raw)
To: akpm; +Cc: linux-kernel
Description: Clarify the human-time units to jiffies conversion
functions by using the constants in time.h. This makes many of the
subsequent patches direct copies of the current code.
Signed-off-by: Nishanth Aravamudan <nacc@us.ibm.com>
---
include/linux/jiffies.h | 40 ++++++++++++++++++++--------------------
include/linux/time.h | 4 ++++
2 files changed, 24 insertions(+), 20 deletions(-)
--- 2.6.13-rc5-mm1/include/linux/time.h 2005-03-01 23:38:12.000000000 -0800
+++ 2.6.13-rc5-mm1-dev/include/linux/time.h 2005-08-14 12:53:17.000000000 -0700
@@ -28,6 +28,10 @@ struct timezone {
#ifdef __KERNEL__
/* Parameters used to convert the timespec values */
+#ifndef MSEC_PER_SEC
+#define MSEC_PER_SEC (1000L)
+#endif
+
#ifndef USEC_PER_SEC
#define USEC_PER_SEC (1000000L)
#endif
diff -urpN 2.6.13-rc5-mm1/include/linux/jiffies.h 2.6.13-rc5-mm1-dev/include/linux/jiffies.h
--- 2.6.13-rc5-mm1/include/linux/jiffies.h 2005-03-01 23:37:31.000000000 -0800
+++ 2.6.13-rc5-mm1-dev/include/linux/jiffies.h 2005-08-10 23:31:04.000000000 -0700
@@ -254,23 +254,23 @@ static inline u64 get_jiffies_64(void)
*/
static inline unsigned int jiffies_to_msecs(const unsigned long j)
{
-#if HZ <= 1000 && !(1000 % HZ)
- return (1000 / HZ) * j;
-#elif HZ > 1000 && !(HZ % 1000)
- return (j + (HZ / 1000) - 1)/(HZ / 1000);
+#if HZ <= MSEC_PER_SEC && !(MSEC_PER_SEC % HZ)
+ return (MSEC_PER_SEC / HZ) * j;
+#elif HZ > MSEC_PER_SEC && !(HZ % MSEC_PER_SEC)
+ return (j + (HZ / MSEC_PER_SEC) - 1)/(HZ / MSEC_PER_SEC);
#else
- return (j * 1000) / HZ;
+ return (j * MSEC_PER_SEC) / HZ;
#endif
}
static inline unsigned int jiffies_to_usecs(const unsigned long j)
{
-#if HZ <= 1000000 && !(1000000 % HZ)
- return (1000000 / HZ) * j;
-#elif HZ > 1000000 && !(HZ % 1000000)
- return (j + (HZ / 1000000) - 1)/(HZ / 1000000);
+#if HZ <= USEC_PER_SEC && !(USEC_PER_SEC % HZ)
+ return (USEC_PER_SEC / HZ) * j;
+#elif HZ > USEC_PER_SEC && !(HZ % USEC_PER_SEC)
+ return (j + (HZ / USEC_PER_SEC) - 1)/(HZ / USEC_PER_SEC);
#else
- return (j * 1000000) / HZ;
+ return (j * USEC_PER_SEC) / HZ;
#endif
}
@@ -278,12 +278,12 @@ static inline unsigned long msecs_to_jif
{
if (m > jiffies_to_msecs(MAX_JIFFY_OFFSET))
return MAX_JIFFY_OFFSET;
-#if HZ <= 1000 && !(1000 % HZ)
- return (m + (1000 / HZ) - 1) / (1000 / HZ);
-#elif HZ > 1000 && !(HZ % 1000)
- return m * (HZ / 1000);
+#if HZ <= MSEC_PER_SEC && !(MSEC_PER_SEC % HZ)
+ return (m + (MSEC_PER_SEC / HZ) - 1) / (MSEC_PER_SEC / HZ);
+#elif HZ > MSEC_PER_SEC && !(HZ % MSEC_PER_SEC)
+ return m * (HZ / MSEC_PER_SEC);
#else
- return (m * HZ + 999) / 1000;
+ return (m * HZ + MSEC_PER_SEC - 1) / MSEC_PER_SEC;
#endif
}
@@ -291,12 +291,12 @@ static inline unsigned long usecs_to_jif
{
if (u > jiffies_to_usecs(MAX_JIFFY_OFFSET))
return MAX_JIFFY_OFFSET;
-#if HZ <= 1000000 && !(1000000 % HZ)
- return (u + (1000000 / HZ) - 1) / (1000000 / HZ);
-#elif HZ > 1000000 && !(HZ % 1000000)
- return u * (HZ / 1000000);
+#if HZ <= USEC_PER_SEC && !(USEC_PER_SEC % HZ)
+ return (u + (USEC_PER_SEC / HZ) - 1) / (USEC_PER_SEC / HZ);
+#elif HZ > USEC_PER_SEC && !(HZ % USEC_PER_SEC)
+ return u * (HZ / USEC_PER_SEC);
#else
- return (u * HZ + 999999) / 1000000;
+ return (u * HZ + USEC_PER_SEC - 1) / USEC_PER_SEC;
#endif
}
^ permalink raw reply [flat|nested] 30+ messages in thread
* [-mm PATCH 2/32] fs: fix-up schedule_timeout() usage
2005-08-15 18:05 [-mm PATCH 0/32] fix-up schedule_timeout() usage Nishanth Aravamudan
2005-08-15 18:06 ` [-mm PATCH 1/32] include: update jiffies/{m,u}secs conversion functions Nishanth Aravamudan
@ 2005-08-15 18:08 ` Nishanth Aravamudan
2005-08-15 18:17 ` [xfs-masters] " Christoph Hellwig
` (2 more replies)
2005-08-15 18:08 ` [-mm PATCH 3/32] kernel: " Nishanth Aravamudan
` (15 subsequent siblings)
17 siblings, 3 replies; 30+ messages in thread
From: Nishanth Aravamudan @ 2005-08-15 18:08 UTC (permalink / raw)
To: sfrench, sct, okir, trond.myklebust, reiserfs-dev, urban,
xfs-masters, nathans
Cc: akpm, samba-technical, linux-kernel, reiserfs-list, samba,
linux-xfs
Description: Use schedule_timeout_{,un}interruptible() instead of
set_current_state()/schedule_timeout() to reduce kernel size. Also use
helper functions to convert between human time units and jiffies rather
than constant HZ division to avoid rounding errors.
Signed-off-by: Nishanth Aravamudan <nacc@us.ibm.com>
---
fs/cifs/cifsfs.c | 7 ++-----
fs/cifs/connect.c | 6 ++----
fs/jbd/transaction.c | 3 +--
fs/lockd/clntproc.c | 3 +--
fs/nfs/nfs3proc.c | 3 +--
fs/nfs/nfs4proc.c | 12 ++++--------
fs/reiserfs/journal.c | 3 +--
fs/smbfs/proc.c | 3 +--
fs/xfs/linux-2.6/time.h | 3 +--
fs/xfs/linux-2.6/xfs_buf.c | 6 +++---
fs/xfs/linux-2.6/xfs_super.c | 12 ++++++------
11 files changed, 23 insertions(+), 38 deletions(-)
diff -urpN 2.6.13-rc5-mm1/fs/cifs/cifsfs.c 2.6.13-rc5-mm1-dev/fs/cifs/cifsfs.c
--- 2.6.13-rc5-mm1/fs/cifs/cifsfs.c 2005-08-07 09:57:37.000000000 -0700
+++ 2.6.13-rc5-mm1-dev/fs/cifs/cifsfs.c 2005-08-10 15:03:11.000000000 -0700
@@ -781,14 +781,11 @@ static int cifs_oplock_thread(void * dum
oplockThread = current;
do {
- set_current_state(TASK_INTERRUPTIBLE);
-
- schedule_timeout(1*HZ);
+ schedule_timeout_interruptible(1*HZ);
spin_lock(&GlobalMid_Lock);
if(list_empty(&GlobalOplock_Q)) {
spin_unlock(&GlobalMid_Lock);
- set_current_state(TASK_INTERRUPTIBLE);
- schedule_timeout(39*HZ);
+ schedule_timeout_interruptible(39*HZ);
} else {
oplock_item = list_entry(GlobalOplock_Q.next,
struct oplock_q_entry, qhead);
diff -urpN 2.6.13-rc5-mm1/fs/cifs/connect.c 2.6.13-rc5-mm1-dev/fs/cifs/connect.c
--- 2.6.13-rc5-mm1/fs/cifs/connect.c 2005-08-07 10:05:22.000000000 -0700
+++ 2.6.13-rc5-mm1-dev/fs/cifs/connect.c 2005-08-12 13:42:49.000000000 -0700
@@ -3215,10 +3215,8 @@ cifs_umount(struct super_block *sb, stru
}
cifs_sb->tcon = NULL;
- if (ses) {
- set_current_state(TASK_INTERRUPTIBLE);
- schedule_timeout(HZ / 2);
- }
+ if (ses)
+ schedule_timeout_interruptible(msecs_to_jiffies(500));
if (ses)
sesInfoFree(ses);
diff -urpN 2.6.13-rc5-mm1/fs/jbd/transaction.c 2.6.13-rc5-mm1-dev/fs/jbd/transaction.c
--- 2.6.13-rc5-mm1/fs/jbd/transaction.c 2005-08-07 10:05:22.000000000 -0700
+++ 2.6.13-rc5-mm1-dev/fs/jbd/transaction.c 2005-08-10 15:03:33.000000000 -0700
@@ -1340,8 +1340,7 @@ int journal_stop(handle_t *handle)
if (handle->h_sync) {
do {
old_handle_count = transaction->t_handle_count;
- set_current_state(TASK_UNINTERRUPTIBLE);
- schedule_timeout(1);
+ schedule_timeout_uninterruptible(1);
} while (old_handle_count != transaction->t_handle_count);
}
diff -urpN 2.6.13-rc5-mm1/fs/lockd/clntproc.c 2.6.13-rc5-mm1-dev/fs/lockd/clntproc.c
--- 2.6.13-rc5-mm1/fs/lockd/clntproc.c 2005-08-07 09:58:15.000000000 -0700
+++ 2.6.13-rc5-mm1-dev/fs/lockd/clntproc.c 2005-08-10 15:03:41.000000000 -0700
@@ -299,8 +299,7 @@ nlmclnt_alloc_call(void)
return call;
}
printk("nlmclnt_alloc_call: failed, waiting for memory\n");
- current->state = TASK_INTERRUPTIBLE;
- schedule_timeout(5*HZ);
+ schedule_timeout_interruptible(5*HZ);
}
return NULL;
}
diff -urpN 2.6.13-rc5-mm1/fs/nfs/nfs3proc.c 2.6.13-rc5-mm1-dev/fs/nfs/nfs3proc.c
--- 2.6.13-rc5-mm1/fs/nfs/nfs3proc.c 2005-08-07 09:58:15.000000000 -0700
+++ 2.6.13-rc5-mm1-dev/fs/nfs/nfs3proc.c 2005-08-10 15:12:50.000000000 -0700
@@ -34,8 +34,7 @@ nfs3_rpc_wrapper(struct rpc_clnt *clnt,
res = rpc_call_sync(clnt, msg, flags);
if (res != -EJUKEBOX)
break;
- set_current_state(TASK_INTERRUPTIBLE);
- schedule_timeout(NFS_JUKEBOX_RETRY_TIME);
+ schedule_timeout_interruptible(NFS_JUKEBOX_RETRY_TIME);
res = -ERESTARTSYS;
} while (!signalled());
rpc_clnt_sigunmask(clnt, &oldset);
diff -urpN 2.6.13-rc5-mm1/fs/nfs/nfs4proc.c 2.6.13-rc5-mm1-dev/fs/nfs/nfs4proc.c
--- 2.6.13-rc5-mm1/fs/nfs/nfs4proc.c 2005-08-07 09:58:15.000000000 -0700
+++ 2.6.13-rc5-mm1-dev/fs/nfs/nfs4proc.c 2005-08-10 15:15:04.000000000 -0700
@@ -2412,14 +2412,11 @@ static int nfs4_delay(struct rpc_clnt *c
*timeout = NFS4_POLL_RETRY_MAX;
rpc_clnt_sigmask(clnt, &oldset);
if (clnt->cl_intr) {
- set_current_state(TASK_INTERRUPTIBLE);
- schedule_timeout(*timeout);
+ schedule_timeout_interruptible(*timeout);
if (signalled())
res = -ERESTARTSYS;
- } else {
- set_current_state(TASK_UNINTERRUPTIBLE);
- schedule_timeout(*timeout);
- }
+ } else
+ schedule_timeout_uninterruptible(*timeout);
rpc_clnt_sigunmask(clnt, &oldset);
*timeout <<= 1;
return res;
@@ -2572,8 +2569,7 @@ int nfs4_proc_delegreturn(struct inode *
static unsigned long
nfs4_set_lock_task_retry(unsigned long timeout)
{
- current->state = TASK_INTERRUPTIBLE;
- schedule_timeout(timeout);
+ schedule_timeout_interruptible(timeout);
timeout <<= 1;
if (timeout > NFS4_LOCK_MAXTIMEOUT)
return NFS4_LOCK_MAXTIMEOUT;
diff -urpN 2.6.13-rc5-mm1/fs/reiserfs/journal.c 2.6.13-rc5-mm1-dev/fs/reiserfs/journal.c
--- 2.6.13-rc5-mm1/fs/reiserfs/journal.c 2005-08-07 10:05:22.000000000 -0700
+++ 2.6.13-rc5-mm1-dev/fs/reiserfs/journal.c 2005-08-10 15:15:11.000000000 -0700
@@ -2868,8 +2868,7 @@ static void let_transaction_grow(struct
struct reiserfs_journal *journal = SB_JOURNAL(sb);
unsigned long bcount = journal->j_bcount;
while (1) {
- set_current_state(TASK_UNINTERRUPTIBLE);
- schedule_timeout(1);
+ schedule_timeout_uninterruptible(1);
journal->j_current_jl->j_state |= LIST_COMMIT_PENDING;
while ((atomic_read(&journal->j_wcount) > 0 ||
atomic_read(&journal->j_jlock)) &&
diff -urpN 2.6.13-rc5-mm1/fs/smbfs/proc.c 2.6.13-rc5-mm1-dev/fs/smbfs/proc.c
--- 2.6.13-rc5-mm1/fs/smbfs/proc.c 2005-03-01 23:37:49.000000000 -0800
+++ 2.6.13-rc5-mm1-dev/fs/smbfs/proc.c 2005-08-12 13:43:10.000000000 -0700
@@ -2397,8 +2397,7 @@ smb_proc_readdir_long(struct file *filp,
if (req->rq_rcls == ERRSRV && req->rq_err == ERRerror) {
/* a damn Win95 bug - sometimes it clags if you
ask it too fast */
- current->state = TASK_INTERRUPTIBLE;
- schedule_timeout(HZ/5);
+ schedule_timeout_interruptible(msecs_to_jiffies(200));
continue;
}
diff -urpN 2.6.13-rc5-mm1/fs/xfs/linux-2.6/time.h 2.6.13-rc5-mm1-dev/fs/xfs/linux-2.6/time.h
--- 2.6.13-rc5-mm1/fs/xfs/linux-2.6/time.h 2005-03-01 23:38:33.000000000 -0800
+++ 2.6.13-rc5-mm1-dev/fs/xfs/linux-2.6/time.h 2005-08-10 15:15:43.000000000 -0700
@@ -39,8 +39,7 @@ typedef struct timespec timespec_t;
static inline void delay(long ticks)
{
- set_current_state(TASK_UNINTERRUPTIBLE);
- schedule_timeout(ticks);
+ schedule_timeout_uninterruptible(ticks);
}
static inline void nanotime(struct timespec *tvp)
diff -urpN 2.6.13-rc5-mm1/fs/xfs/linux-2.6/xfs_buf.c 2.6.13-rc5-mm1-dev/fs/xfs/linux-2.6/xfs_buf.c
--- 2.6.13-rc5-mm1/fs/xfs/linux-2.6/xfs_buf.c 2005-08-07 09:58:15.000000000 -0700
+++ 2.6.13-rc5-mm1-dev/fs/xfs/linux-2.6/xfs_buf.c 2005-08-12 13:44:19.000000000 -0700
@@ -1778,10 +1778,10 @@ xfsbufd(
xfsbufd_force_sleep = 0;
}
- set_current_state(TASK_INTERRUPTIBLE);
- schedule_timeout((xfs_buf_timer_centisecs * HZ) / 100);
+ schedule_timeout_interruptible
+ (xfs_buf_timer_centisecs * msecs_to_jiffies(10));
- age = (xfs_buf_age_centisecs * HZ) / 100;
+ age = xfs_buf_age_centisecs * msecs_to_jiffies(10);
spin_lock(&pbd_delwrite_lock);
list_for_each_entry_safe(pb, n, &pbd_delwrite_queue, pb_list) {
PB_TRACE(pb, "walkq1", (long)pagebuf_ispin(pb));
diff -urpN 2.6.13-rc5-mm1/fs/xfs/linux-2.6/xfs_super.c 2.6.13-rc5-mm1-dev/fs/xfs/linux-2.6/xfs_super.c
--- 2.6.13-rc5-mm1/fs/xfs/linux-2.6/xfs_super.c 2005-08-07 09:58:15.000000000 -0700
+++ 2.6.13-rc5-mm1-dev/fs/xfs/linux-2.6/xfs_super.c 2005-08-12 13:47:02.000000000 -0700
@@ -416,7 +416,7 @@ xfs_flush_inode(
igrab(inode);
xfs_syncd_queue_work(vfs, inode, xfs_flush_inode_work);
- delay(HZ/2);
+ delay(msecs_to_jiffies(500));
}
/*
@@ -441,7 +441,7 @@ xfs_flush_device(
igrab(inode);
xfs_syncd_queue_work(vfs, inode, xfs_flush_device_work);
- delay(HZ/2);
+ delay(msecs_to_jiffies(500));
xfs_log_force(ip->i_mount, (xfs_lsn_t)0, XFS_LOG_FORCE|XFS_LOG_SYNC);
}
@@ -478,10 +478,9 @@ xfssyncd(
wake_up(&vfsp->vfs_wait_sync_task);
INIT_LIST_HEAD(&tmp);
- timeleft = (xfs_syncd_centisecs * HZ) / 100;
+ timeleft = xfs_syncd_centisecs * msecs_to_jiffies(10);
for (;;) {
- set_current_state(TASK_INTERRUPTIBLE);
- timeleft = schedule_timeout(timeleft);
+ timeleft = schedule_timeout_interruptible(timeleft);
/* swsusp */
try_to_freeze();
if (vfsp->vfs_flag & VFS_UMOUNT)
@@ -495,7 +494,8 @@ xfssyncd(
*/
if (!timeleft || list_empty(&vfsp->vfs_sync_list)) {
if (!timeleft)
- timeleft = (xfs_syncd_centisecs * HZ) / 100;
+ timeleft = xfs_syncd_centisecs *
+ msecs_to_jiffies(10);
INIT_LIST_HEAD(&vfsp->vfs_sync_work.w_list);
list_add_tail(&vfsp->vfs_sync_work.w_list,
&vfsp->vfs_sync_list);
^ permalink raw reply [flat|nested] 30+ messages in thread
* [-mm PATCH 3/32] kernel: fix-up schedule_timeout() usage
2005-08-15 18:05 [-mm PATCH 0/32] fix-up schedule_timeout() usage Nishanth Aravamudan
2005-08-15 18:06 ` [-mm PATCH 1/32] include: update jiffies/{m,u}secs conversion functions Nishanth Aravamudan
2005-08-15 18:08 ` [-mm PATCH 2/32] fs: fix-up schedule_timeout() usage Nishanth Aravamudan
@ 2005-08-15 18:08 ` Nishanth Aravamudan
2005-08-15 18:09 ` [-mm PATCH 4/32] mm: " Nishanth Aravamudan
` (14 subsequent siblings)
17 siblings, 0 replies; 30+ messages in thread
From: Nishanth Aravamudan @ 2005-08-15 18:08 UTC (permalink / raw)
To: akpm; +Cc: linux-kernel
Description: Use schedule_timeout_{,un}interruptible() instead of
set_current_state()/schedule_timeout() to reduce kernel size.
Signed-off-by: Nishanth Aravamudan <nacc@us.ibm.com>
---
kernel/compat.c | 9 +++------
kernel/signal.c | 3 +--
kernel/timer.c | 18 ++++++------------
3 files changed, 10 insertions(+), 20 deletions(-)
diff -urpN 2.6.13-rc5-mm1/kernel/compat.c 2.6.13-rc5-mm1-dev/kernel/compat.c
--- 2.6.13-rc5-mm1/kernel/compat.c 2005-08-07 09:57:38.000000000 -0700
+++ 2.6.13-rc5-mm1-dev/kernel/compat.c 2005-08-10 15:21:46.000000000 -0700
@@ -48,8 +48,7 @@ static long compat_nanosleep_restart(str
if (!time_after(expire, now))
return 0;
- current->state = TASK_INTERRUPTIBLE;
- expire = schedule_timeout(expire - now);
+ expire = schedule_timeout_interruptible(expire - now);
if (expire == 0)
return 0;
@@ -82,8 +81,7 @@ asmlinkage long compat_sys_nanosleep(str
return -EINVAL;
expire = timespec_to_jiffies(&t) + (t.tv_sec || t.tv_nsec);
- current->state = TASK_INTERRUPTIBLE;
- expire = schedule_timeout(expire);
+ expire = schedule_timeout_interruptible(expire);
if (expire == 0)
return 0;
@@ -795,8 +793,7 @@ compat_sys_rt_sigtimedwait (compat_sigse
recalc_sigpending();
spin_unlock_irq(¤t->sighand->siglock);
- current->state = TASK_INTERRUPTIBLE;
- timeout = schedule_timeout(timeout);
+ timeout = schedule_timeout_interruptible(timeout);
spin_lock_irq(¤t->sighand->siglock);
sig = dequeue_signal(current, &s, &info);
diff -urpN 2.6.13-rc5-mm1/kernel/signal.c 2.6.13-rc5-mm1-dev/kernel/signal.c
--- 2.6.13-rc5-mm1/kernel/signal.c 2005-08-07 09:58:16.000000000 -0700
+++ 2.6.13-rc5-mm1-dev/kernel/signal.c 2005-08-10 15:22:29.000000000 -0700
@@ -2228,8 +2228,7 @@ sys_rt_sigtimedwait(const sigset_t __use
recalc_sigpending();
spin_unlock_irq(¤t->sighand->siglock);
- current->state = TASK_INTERRUPTIBLE;
- timeout = schedule_timeout(timeout);
+ timeout = schedule_timeout_interruptible(timeout);
try_to_freeze();
spin_lock_irq(¤t->sighand->siglock);
diff -urpN 2.6.13-rc5-mm1/kernel/timer.c 2.6.13-rc5-mm1-dev/kernel/timer.c
--- 2.6.13-rc5-mm1/kernel/timer.c 2005-08-07 10:05:22.000000000 -0700
+++ 2.6.13-rc5-mm1-dev/kernel/timer.c 2005-08-10 15:23:18.000000000 -0700
@@ -1199,8 +1199,7 @@ static long __sched nanosleep_restart(st
if (!time_after(expire, now))
return 0;
- current->state = TASK_INTERRUPTIBLE;
- expire = schedule_timeout(expire - now);
+ expire = schedule_timeout_interruptible(expire - now);
ret = 0;
if (expire) {
@@ -1228,8 +1227,7 @@ asmlinkage long sys_nanosleep(struct tim
return -EINVAL;
expire = timespec_to_jiffies(&t) + (t.tv_sec || t.tv_nsec);
- current->state = TASK_INTERRUPTIBLE;
- expire = schedule_timeout(expire);
+ expire = schedule_timeout_interruptible(expire);
ret = 0;
if (expire) {
@@ -1627,10 +1625,8 @@ void msleep(unsigned int msecs)
{
unsigned long timeout = msecs_to_jiffies(msecs) + 1;
- while (timeout) {
- set_current_state(TASK_UNINTERRUPTIBLE);
- timeout = schedule_timeout(timeout);
- }
+ while (timeout)
+ timeout = schedule_timeout_uninterruptible(timeout);
}
EXPORT_SYMBOL(msleep);
@@ -1643,10 +1639,8 @@ unsigned long msleep_interruptible(unsig
{
unsigned long timeout = msecs_to_jiffies(msecs) + 1;
- while (timeout && !signal_pending(current)) {
- set_current_state(TASK_INTERRUPTIBLE);
- timeout = schedule_timeout(timeout);
- }
+ while (timeout && !signal_pending(current))
+ timeout = schedule_timeout_interruptible(timeout);
return jiffies_to_msecs(timeout);
}
^ permalink raw reply [flat|nested] 30+ messages in thread
* [-mm PATCH 4/32] mm: fix-up schedule_timeout() usage
2005-08-15 18:05 [-mm PATCH 0/32] fix-up schedule_timeout() usage Nishanth Aravamudan
` (2 preceding siblings ...)
2005-08-15 18:08 ` [-mm PATCH 3/32] kernel: " Nishanth Aravamudan
@ 2005-08-15 18:09 ` Nishanth Aravamudan
2005-08-15 18:10 ` [-mm PATCH 06/32] sound: " Nishanth Aravamudan
` (13 subsequent siblings)
17 siblings, 0 replies; 30+ messages in thread
From: Nishanth Aravamudan @ 2005-08-15 18:09 UTC (permalink / raw)
To: akpm; +Cc: linux-kernel
Description: Use schedule_timeout_{,un}interruptible() instead of
set_current_state()/schedule_timeout() to reduce kernel size.
Signed-off-by: Nishanth Aravamudan <nacc@us.ibm.com>
---
mm/oom_kill.c | 3 +--
mm/swapfile.c | 3 +--
2 files changed, 2 insertions(+), 4 deletions(-)
diff -urpN 2.6.13-rc5-mm1/mm/oom_kill.c 2.6.13-rc5-mm1-dev/mm/oom_kill.c
--- 2.6.13-rc5-mm1/mm/oom_kill.c 2005-08-07 09:58:16.000000000 -0700
+++ 2.6.13-rc5-mm1-dev/mm/oom_kill.c 2005-08-10 15:23:34.000000000 -0700
@@ -290,6 +290,5 @@ retry:
* Give "p" a good chance of killing itself before we
* retry to allocate memory.
*/
- __set_current_state(TASK_INTERRUPTIBLE);
- schedule_timeout(1);
+ schedule_timeout_interruptible(1);
}
diff -urpN 2.6.13-rc5-mm1/mm/swapfile.c 2.6.13-rc5-mm1-dev/mm/swapfile.c
--- 2.6.13-rc5-mm1/mm/swapfile.c 2005-08-07 10:05:22.000000000 -0700
+++ 2.6.13-rc5-mm1-dev/mm/swapfile.c 2005-08-10 15:23:41.000000000 -0700
@@ -1151,8 +1151,7 @@ asmlinkage long sys_swapoff(const char _
p->highest_bit = 0; /* cuts scans short */
while (p->flags >= SWP_SCANNING) {
spin_unlock(&swap_lock);
- set_current_state(TASK_UNINTERRUPTIBLE);
- schedule_timeout(1);
+ schedule_timeout_uninterruptible(1);
spin_lock(&swap_lock);
}
^ permalink raw reply [flat|nested] 30+ messages in thread
* [-mm PATCH 05/32] net: fix-up schedule_timeout() usage
[not found] ` <20050815180514.GC2854-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org>
@ 2005-08-15 18:10 ` Nishanth Aravamudan
2005-08-15 18:16 ` [-mm PATCH 15/32] drivers/acpi: " Nishanth Aravamudan
1 sibling, 0 replies; 30+ messages in thread
From: Nishanth Aravamudan @ 2005-08-15 18:10 UTC (permalink / raw)
To: davem-fT/PcQaiUtIeIZ0/mPfg9Q, kuznet-v/Mj1YrvjDBInbfyfbPRSQ,
pekkas-UjJjq++bwZ7HOG6cAo2yLw, jmorris-H+wXaHxf7aLQT0dZR+AlfA,
yoshfuji-VfPWfsRibaP+Ru+s062T9g, kaber-9zj18yfci/wOIzVOb1FTxg,
jt-sDzT885Ts8HQT0dZR+AlfA, okir-pn4DOG8n3UYbFoVRYvo4fw
Cc: akpm-3NddpPZAyC0, netdev-u79uwXL29TY76Z2rM5mHXA,
irda-users-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f
Description: Use schedule_timeout_{,un}interruptible() instead of
set_current_state()/schedule_timeout() to reduce kernel size. Also use
human-time conversion functions instead of hard-coded division to avoid
rounding issues.
Signed-off-by: Nishanth Aravamudan <nacc-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org>
---
net/core/pktgen.c | 13 +++++--------
net/dccp/proto.c | 2 +-
net/ipv4/ipconfig.c | 5 ++---
net/irda/ircomm/ircomm_tty.c | 9 +++------
net/sunrpc/svcsock.c | 3 +--
5 files changed, 12 insertions(+), 20 deletions(-)
--- 2.6.13-rc5-mm1/net/core/pktgen.c 2005-08-07 10:05:22.000000000 -0700
+++ 2.6.13-rc5-mm1-dev/net/core/pktgen.c 2005-08-14 13:32:59.000000000 -0700
@@ -1452,8 +1452,7 @@ static int proc_thread_write(struct file
thread_lock();
t->control |= T_REMDEV;
thread_unlock();
- current->state = TASK_INTERRUPTIBLE;
- schedule_timeout(HZ/8); /* Propagate thread->control */
+ schedule_timeout_interruptible(msecs_to_jiffies(125)); /* Propagate thread->control */
ret = count;
sprintf(pg_result, "OK: rem_device_all");
goto out;
@@ -1716,10 +1715,9 @@ static void spin(struct pktgen_dev *pkt_
printk(KERN_INFO "sleeping for %d\n", (int)(spin_until_us - now));
while (now < spin_until_us) {
/* TODO: optimise sleeping behavior */
- if (spin_until_us - now > (1000000/HZ)+1) {
- current->state = TASK_INTERRUPTIBLE;
- schedule_timeout(1);
- } else if (spin_until_us - now > 100) {
+ if (spin_until_us - now > jiffies_to_usecs(1)+1)
+ schedule_timeout_interruptible(1);
+ else if (spin_until_us - now > 100) {
do_softirq();
if (!pkt_dev->running)
return;
@@ -2449,8 +2447,7 @@ static void pktgen_run_all_threads(void)
}
thread_unlock();
- current->state = TASK_INTERRUPTIBLE;
- schedule_timeout(HZ/8); /* Propagate thread->control */
+ schedule_timeout_interruptible(msecs_to_jiffies(125)); /* Propagate thread->control */
pktgen_wait_all_threads_run();
}
diff -urpN 2.6.13-rc5-mm1/net/dccp/proto.c 2.6.13-rc5-mm1-dev/net/dccp/proto.c
--- 2.6.13-rc5-mm1/net/dccp/proto.c 2005-08-07 10:05:22.000000000 -0700
+++ 2.6.13-rc5-mm1-dev/net/dccp/proto.c 2005-08-10 16:10:55.000000000 -0700
@@ -225,7 +225,7 @@ int dccp_sendmsg(struct kiocb *iocb, str
if (delay > timeo)
goto out_discard;
release_sock(sk);
- delay = schedule_timeout(delay);
+ delay = schedule_timeout_interruptible(delay);
lock_sock(sk);
timeo -= delay;
if (signal_pending(current))
diff -urpN 2.6.13-rc5-mm1/net/ipv4/ipconfig.c 2.6.13-rc5-mm1-dev/net/ipv4/ipconfig.c
--- 2.6.13-rc5-mm1/net/ipv4/ipconfig.c 2005-08-07 10:05:22.000000000 -0700
+++ 2.6.13-rc5-mm1-dev/net/ipv4/ipconfig.c 2005-08-10 15:26:57.000000000 -0700
@@ -1102,10 +1102,9 @@ static int __init ic_dynamic(void)
#endif
jiff = jiffies + (d->next ? CONF_INTER_TIMEOUT : timeout);
- while (time_before(jiffies, jiff) && !ic_got_reply) {
+ while (time_before(jiffies, jiff) && !ic_got_reply)
set_current_state(TASK_UNINTERRUPTIBLE);
- schedule_timeout(1);
- }
+ schedule_timeout_uninterruptible(1);
#ifdef IPCONFIG_DHCP
/* DHCP isn't done until we get a DHCPACK. */
if ((ic_got_reply & IC_BOOTP)
diff -urpN 2.6.13-rc5-mm1/net/irda/ircomm/ircomm_tty.c 2.6.13-rc5-mm1-dev/net/irda/ircomm/ircomm_tty.c
--- 2.6.13-rc5-mm1/net/irda/ircomm/ircomm_tty.c 2005-08-07 09:57:38.000000000 -0700
+++ 2.6.13-rc5-mm1-dev/net/irda/ircomm/ircomm_tty.c 2005-08-10 15:27:13.000000000 -0700
@@ -567,10 +567,8 @@ static void ircomm_tty_close(struct tty_
self->tty = NULL;
if (self->blocked_open) {
- if (self->close_delay) {
- current->state = TASK_INTERRUPTIBLE;
- schedule_timeout(self->close_delay);
- }
+ if (self->close_delay)
+ schedule_timeout_interruptible(self->close_delay);
wake_up_interruptible(&self->open_wait);
}
@@ -863,8 +861,7 @@ static void ircomm_tty_wait_until_sent(s
spin_lock_irqsave(&self->spinlock, flags);
while (self->tx_skb && self->tx_skb->len) {
spin_unlock_irqrestore(&self->spinlock, flags);
- current->state = TASK_INTERRUPTIBLE;
- schedule_timeout(poll_time);
+ schedule_timeout_interruptible(poll_time);
spin_lock_irqsave(&self->spinlock, flags);
if (signal_pending(current))
break;
diff -urpN 2.6.13-rc5-mm1/net/sunrpc/svcsock.c 2.6.13-rc5-mm1-dev/net/sunrpc/svcsock.c
--- 2.6.13-rc5-mm1/net/sunrpc/svcsock.c 2005-08-07 10:05:22.000000000 -0700
+++ 2.6.13-rc5-mm1-dev/net/sunrpc/svcsock.c 2005-08-12 13:51:40.000000000 -0700
@@ -1167,8 +1167,7 @@ svc_recv(struct svc_serv *serv, struct s
while (rqstp->rq_arghi < pages) {
struct page *p = alloc_page(GFP_KERNEL);
if (!p) {
- set_current_state(TASK_UNINTERRUPTIBLE);
- schedule_timeout(HZ/2);
+ schedule_timeout_uninterruptible(msecs_to_jiffies(500);
continue;
}
rqstp->rq_argpages[rqstp->rq_arghi++] = p;
-------------------------------------------------------
SF.Net email is Sponsored by the Better Software Conference & EXPO
September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices
Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA
Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf
^ permalink raw reply [flat|nested] 30+ messages in thread
* [-mm PATCH 06/32] sound: fix-up schedule_timeout() usage
2005-08-15 18:05 [-mm PATCH 0/32] fix-up schedule_timeout() usage Nishanth Aravamudan
` (3 preceding siblings ...)
2005-08-15 18:09 ` [-mm PATCH 4/32] mm: " Nishanth Aravamudan
@ 2005-08-15 18:10 ` Nishanth Aravamudan
2005-08-15 18:14 ` [-mm PATCH 11/32] mips: " Nishanth Aravamudan
` (12 subsequent siblings)
17 siblings, 0 replies; 30+ messages in thread
From: Nishanth Aravamudan @ 2005-08-15 18:10 UTC (permalink / raw)
To: perex, greg, khali, zab, mulix; +Cc: akpm, alsa-devel
Description: Use schedule_timeout_{,un}interruptible() instead of
set_current_state()/schedule_timeout() to reduce kernel size. Also use
human-time conversion functions instead of hard-coded division to avoid
rounding issues.
Signed-off-by: Nishanth Aravamudan <nacc@us.ibm.com>
---
sound/core/seq/seq_instr.c | 12 ++++--------
sound/core/seq/seq_lock.c | 3 +--
sound/core/seq/seq_memory.c | 3 +--
sound/i2c/cs8427.c | 3 +--
sound/isa/ad1848/ad1848_lib.c | 6 ++----
sound/isa/gus/gus_pcm.c | 3 +--
sound/isa/sb/emu8000.c | 9 +++------
sound/isa/sb/emu8000_patch.c | 3 +--
sound/isa/sb/emu8000_pcm.c | 3 +--
sound/isa/sscape.c | 17 ++---------------
sound/isa/wavefront/wavefront_synth.c | 6 ++----
sound/pci/ac97/ac97_codec.c | 15 +++++----------
sound/pci/ali5451/ali5451.c | 12 ++++--------
sound/pci/atiixp.c | 3 +--
sound/pci/atiixp_modem.c | 3 +--
sound/pci/cs4281.c | 6 ++----
sound/pci/ens1370.c | 3 +--
sound/pci/fm801.c | 9 +++------
sound/pci/ice1712/pontis.c | 3 +--
sound/pci/intel8x0.c | 3 +--
sound/pci/intel8x0m.c | 3 +--
sound/pci/maestro3.c | 9 +++------
sound/pci/mixart/mixart.c | 3 +--
sound/pci/trident/trident_main.c | 3 +--
sound/pci/via82xx.c | 6 ++----
sound/pci/via82xx_modem.c | 6 ++----
sound/pci/ymfpci/ymfpci_main.c | 5 ++---
sound/usb/usbaudio.c | 3 +--
28 files changed, 51 insertions(+), 112 deletions(-)
diff -urpN 2.6.13-rc5-mm1/sound/core/seq/seq_instr.c 2.6.13-rc5-mm1-dev/sound/core/seq/seq_instr.c
--- 2.6.13-rc5-mm1/sound/core/seq/seq_instr.c 2005-08-07 09:57:38.000000000 -0700
+++ 2.6.13-rc5-mm1-dev/sound/core/seq/seq_instr.c 2005-08-10 15:28:48.000000000 -0700
@@ -109,8 +109,7 @@ void snd_seq_instr_list_free(snd_seq_kin
spin_lock_irqsave(&list->lock, flags);
while (instr->use) {
spin_unlock_irqrestore(&list->lock, flags);
- set_current_state(TASK_INTERRUPTIBLE);
- schedule_timeout(1);
+ schedule_timeout_interruptible(1);
spin_lock_irqsave(&list->lock, flags);
}
spin_unlock_irqrestore(&list->lock, flags);
@@ -199,10 +198,8 @@ int snd_seq_instr_list_free_cond(snd_seq
while (flist) {
instr = flist;
flist = instr->next;
- while (instr->use) {
- set_current_state(TASK_INTERRUPTIBLE);
- schedule_timeout(1);
- }
+ while (instr->use)
+ schedule_timeout_interruptible(1);
if (snd_seq_instr_free(instr, atomic)<0)
snd_printk(KERN_WARNING "instrument free problem\n");
instr = next;
@@ -554,8 +551,7 @@ static int instr_free(snd_seq_kinstr_ops
instr->ops->notify(instr->ops->private_data, instr, SNDRV_SEQ_INSTR_NOTIFY_REMOVE);
while (instr->use) {
spin_unlock_irqrestore(&list->lock, flags);
- set_current_state(TASK_INTERRUPTIBLE);
- schedule_timeout(1);
+ schedule_timeout_interruptible(1);
spin_lock_irqsave(&list->lock, flags);
}
spin_unlock_irqrestore(&list->lock, flags);
diff -urpN 2.6.13-rc5-mm1/sound/core/seq/seq_lock.c 2.6.13-rc5-mm1-dev/sound/core/seq/seq_lock.c
--- 2.6.13-rc5-mm1/sound/core/seq/seq_lock.c 2005-03-01 23:38:06.000000000 -0800
+++ 2.6.13-rc5-mm1-dev/sound/core/seq/seq_lock.c 2005-08-10 15:29:07.000000000 -0700
@@ -39,8 +39,7 @@ void snd_use_lock_sync_helper(snd_use_lo
snd_printk(KERN_WARNING "seq_lock: timeout [%d left] in %s:%d\n", atomic_read(lockp), file, line);
break;
}
- set_current_state(TASK_UNINTERRUPTIBLE);
- schedule_timeout(1);
+ schedule_timeout_uninterruptible(1);
max_count--;
}
}
diff -urpN 2.6.13-rc5-mm1/sound/core/seq/seq_memory.c 2.6.13-rc5-mm1-dev/sound/core/seq/seq_memory.c
--- 2.6.13-rc5-mm1/sound/core/seq/seq_memory.c 2005-08-07 09:58:16.000000000 -0700
+++ 2.6.13-rc5-mm1-dev/sound/core/seq/seq_memory.c 2005-08-10 15:29:14.000000000 -0700
@@ -423,8 +423,7 @@ int snd_seq_pool_done(pool_t *pool)
snd_printk(KERN_WARNING "snd_seq_pool_done timeout: %d cells remain\n", atomic_read(&pool->counter));
break;
}
- set_current_state(TASK_UNINTERRUPTIBLE);
- schedule_timeout(1);
+ schedule_timeout_uninterruptible(1);
max_count--;
}
diff -urpN 2.6.13-rc5-mm1/sound/i2c/cs8427.c 2.6.13-rc5-mm1-dev/sound/i2c/cs8427.c
--- 2.6.13-rc5-mm1/sound/i2c/cs8427.c 2005-03-01 23:37:30.000000000 -0800
+++ 2.6.13-rc5-mm1-dev/sound/i2c/cs8427.c 2005-08-10 15:29:20.000000000 -0700
@@ -302,8 +302,7 @@ static void snd_cs8427_reset(snd_i2c_dev
snd_i2c_unlock(cs8427->bus);
if (!(data & CS8427_UNLOCK))
break;
- set_current_state(TASK_UNINTERRUPTIBLE);
- schedule_timeout(1);
+ schedule_timeout_uninterruptible(1);
}
snd_i2c_lock(cs8427->bus);
chip->regmap[CS8427_REG_CLOCKSOURCE] &= ~CS8427_RXDMASK;
diff -urpN 2.6.13-rc5-mm1/sound/isa/ad1848/ad1848_lib.c 2.6.13-rc5-mm1-dev/sound/isa/ad1848/ad1848_lib.c
--- 2.6.13-rc5-mm1/sound/isa/ad1848/ad1848_lib.c 2005-08-07 10:05:22.000000000 -0700
+++ 2.6.13-rc5-mm1-dev/sound/isa/ad1848/ad1848_lib.c 2005-08-10 15:29:40.000000000 -0700
@@ -243,8 +243,7 @@ static void snd_ad1848_mce_down(ad1848_t
snd_printk("mce_down - auto calibration time out (2)\n");
return;
}
- set_current_state(TASK_INTERRUPTIBLE);
- time = schedule_timeout(time);
+ time = schedule_timeout_interruptible(time);
spin_lock_irqsave(&chip->reg_lock, flags);
}
#if 0
@@ -257,8 +256,7 @@ static void snd_ad1848_mce_down(ad1848_t
snd_printk("mce_down - auto calibration time out (3)\n");
return;
}
- set_current_state(TASK_INTERRUPTIBLE);
- time = schedule_timeout(time);
+ time = schedule_timeout_interruptible(time);
spin_lock_irqsave(&chip->reg_lock, flags);
}
spin_unlock_irqrestore(&chip->reg_lock, flags);
diff -urpN 2.6.13-rc5-mm1/sound/isa/gus/gus_pcm.c 2.6.13-rc5-mm1-dev/sound/isa/gus/gus_pcm.c
--- 2.6.13-rc5-mm1/sound/isa/gus/gus_pcm.c 2005-08-07 09:58:16.000000000 -0700
+++ 2.6.13-rc5-mm1-dev/sound/isa/gus/gus_pcm.c 2005-08-10 15:29:46.000000000 -0700
@@ -333,8 +333,7 @@ static int snd_gf1_pcm_poke_block(snd_gu
}
}
if (count > 0 && !in_interrupt()) {
- set_current_state(TASK_INTERRUPTIBLE);
- schedule_timeout(1);
+ schedule_timeout_interruptible(1);
if (signal_pending(current))
return -EAGAIN;
}
diff -urpN 2.6.13-rc5-mm1/sound/isa/sb/emu8000.c 2.6.13-rc5-mm1-dev/sound/isa/sb/emu8000.c
--- 2.6.13-rc5-mm1/sound/isa/sb/emu8000.c 2005-08-07 09:57:38.000000000 -0700
+++ 2.6.13-rc5-mm1-dev/sound/isa/sb/emu8000.c 2005-08-10 15:30:06.000000000 -0700
@@ -135,8 +135,7 @@ static void __init
snd_emu8000_read_wait(emu8000_t *emu)
{
while ((EMU8000_SMALR_READ(emu) & 0x80000000) != 0) {
- set_current_state(TASK_INTERRUPTIBLE);
- schedule_timeout(1);
+ schedule_timeout_interruptible(1);
if (signal_pending(current))
break;
}
@@ -148,8 +147,7 @@ static void __init
snd_emu8000_write_wait(emu8000_t *emu)
{
while ((EMU8000_SMALW_READ(emu) & 0x80000000) != 0) {
- set_current_state(TASK_INTERRUPTIBLE);
- schedule_timeout(1);
+ schedule_timeout_interruptible(1);
if (signal_pending(current))
break;
}
@@ -437,8 +435,7 @@ size_dram(emu8000_t *emu)
for (i = 0; i < 10000; i++) {
if ((EMU8000_SMALW_READ(emu) & 0x80000000) == 0)
break;
- set_current_state(TASK_INTERRUPTIBLE);
- schedule_timeout(1);
+ schedule_timeout_interruptible(1);
if (signal_pending(current))
break;
}
diff -urpN 2.6.13-rc5-mm1/sound/isa/sb/emu8000_patch.c 2.6.13-rc5-mm1-dev/sound/isa/sb/emu8000_patch.c
--- 2.6.13-rc5-mm1/sound/isa/sb/emu8000_patch.c 2005-08-07 09:58:16.000000000 -0700
+++ 2.6.13-rc5-mm1-dev/sound/isa/sb/emu8000_patch.c 2005-08-10 15:30:14.000000000 -0700
@@ -109,8 +109,7 @@ static void
snd_emu8000_write_wait(emu8000_t *emu)
{
while ((EMU8000_SMALW_READ(emu) & 0x80000000) != 0) {
- set_current_state(TASK_INTERRUPTIBLE);
- schedule_timeout(1);
+ schedule_timeout_interruptible(1);
if (signal_pending(current))
break;
}
diff -urpN 2.6.13-rc5-mm1/sound/isa/sb/emu8000_pcm.c 2.6.13-rc5-mm1-dev/sound/isa/sb/emu8000_pcm.c
--- 2.6.13-rc5-mm1/sound/isa/sb/emu8000_pcm.c 2005-03-01 23:38:32.000000000 -0800
+++ 2.6.13-rc5-mm1-dev/sound/isa/sb/emu8000_pcm.c 2005-08-10 15:30:20.000000000 -0700
@@ -117,8 +117,7 @@ snd_emu8000_write_wait(emu8000_t *emu, i
{
while ((EMU8000_SMALW_READ(emu) & 0x80000000) != 0) {
if (can_schedule) {
- set_current_state(TASK_INTERRUPTIBLE);
- schedule_timeout(1);
+ schedule_timeout_interruptible(1);
if (signal_pending(current))
break;
}
diff -urpN 2.6.13-rc5-mm1/sound/isa/sscape.c 2.6.13-rc5-mm1-dev/sound/isa/sscape.c
--- 2.6.13-rc5-mm1/sound/isa/sscape.c 2005-03-01 23:37:48.000000000 -0800
+++ 2.6.13-rc5-mm1-dev/sound/isa/sscape.c 2005-08-10 15:31:18.000000000 -0700
@@ -344,19 +344,6 @@ static void soundscape_free(snd_card_t *
}
/*
- * Put this process into an idle wait-state for a certain number
- * of "jiffies". The process can almost certainly be rescheduled
- * while we're waiting, and so we must NOT be holding any spinlocks
- * when we call this function. If we are then we risk DEADLOCK in
- * SMP (Ha!) or pre-emptible kernels.
- */
-static inline void sleep(long jiffs, int state)
-{
- set_current_state(state);
- schedule_timeout(jiffs);
-}
-
-/*
* Tell the SoundScape to begin a DMA tranfer using the given channel.
* All locking issues are left to the caller.
*/
@@ -393,7 +380,7 @@ static int obp_startup_ack(struct sounds
unsigned long flags;
unsigned char x;
- sleep(1, TASK_INTERRUPTIBLE);
+ schedule_timeout_interruptible(1);
spin_lock_irqsave(&s->lock, flags);
x = inb(HOST_DATA_IO(s->io_base));
@@ -420,7 +407,7 @@ static int host_startup_ack(struct sound
unsigned long flags;
unsigned char x;
- sleep(1, TASK_INTERRUPTIBLE);
+ schedule_timeout_interruptible(1);
spin_lock_irqsave(&s->lock, flags);
x = inb(HOST_DATA_IO(s->io_base));
diff -urpN 2.6.13-rc5-mm1/sound/isa/wavefront/wavefront_synth.c 2.6.13-rc5-mm1-dev/sound/isa/wavefront/wavefront_synth.c
--- 2.6.13-rc5-mm1/sound/isa/wavefront/wavefront_synth.c 2005-08-07 09:57:38.000000000 -0700
+++ 2.6.13-rc5-mm1-dev/sound/isa/wavefront/wavefront_synth.c 2005-08-10 15:33:04.000000000 -0700
@@ -275,8 +275,7 @@ static int
wavefront_sleep (int limit)
{
- set_current_state(TASK_INTERRUPTIBLE);
- schedule_timeout(limit);
+ schedule_timeout_interruptible(limit);
return signal_pending(current);
}
@@ -1788,8 +1787,7 @@ wavefront_should_cause_interrupt (snd_wa
outb (val,port);
spin_unlock_irq(&dev->irq_lock);
while (1) {
- set_current_state(TASK_INTERRUPTIBLE);
- if ((timeout = schedule_timeout(timeout)) == 0)
+ if ((timeout = schedule_timeout_interruptible(timeout)) == 0)
return;
if (dev->irq_ok)
return;
diff -urpN 2.6.13-rc5-mm1/sound/pci/ac97/ac97_codec.c 2.6.13-rc5-mm1-dev/sound/pci/ac97/ac97_codec.c
--- 2.6.13-rc5-mm1/sound/pci/ac97/ac97_codec.c 2005-08-07 10:05:23.000000000 -0700
+++ 2.6.13-rc5-mm1-dev/sound/pci/ac97/ac97_codec.c 2005-08-10 15:33:41.000000000 -0700
@@ -1756,8 +1756,7 @@ static int ac97_reset_wait(ac97_t *ac97,
if ((snd_ac97_read(ac97, AC97_REC_GAIN) & 0x7fff) == 0x0a05)
return 0;
}
- set_current_state(TASK_UNINTERRUPTIBLE);
- schedule_timeout(1);
+ schedule_timeout_uninterruptible(1);
} while (time_after_eq(end_time, jiffies));
return -ENODEV;
}
@@ -2019,8 +2018,7 @@ int snd_ac97_mixer(ac97_bus_t *bus, ac97
do {
if ((snd_ac97_read(ac97, AC97_POWERDOWN) & 0x0f) == 0x0f)
goto __ready_ok;
- set_current_state(TASK_UNINTERRUPTIBLE);
- schedule_timeout(1);
+ schedule_timeout_uninterruptible(1);
} while (time_after_eq(end_time, jiffies));
snd_printk(KERN_WARNING "AC'97 %d analog subsections not ready\n", ac97->num);
}
@@ -2052,8 +2050,7 @@ int snd_ac97_mixer(ac97_bus_t *bus, ac97
do {
if ((snd_ac97_read(ac97, AC97_EXTENDED_MSTATUS) & tmp) == tmp)
goto __ready_ok;
- set_current_state(TASK_UNINTERRUPTIBLE);
- schedule_timeout(1);
+ schedule_timeout_uninterruptible(1);
} while (time_after_eq(end_time, jiffies));
snd_printk(KERN_WARNING "MC'97 %d converters and GPIO not ready (0x%x)\n", ac97->num, snd_ac97_read(ac97, AC97_EXTENDED_MSTATUS));
}
@@ -2294,8 +2291,7 @@ void snd_ac97_resume(ac97_t *ac97)
do {
if (snd_ac97_read(ac97, AC97_MASTER) == 0x8101)
break;
- set_current_state(TASK_UNINTERRUPTIBLE);
- schedule_timeout(1);
+ schedule_timeout_uninterruptible(1);
} while (time_after_eq(end_time, jiffies));
/* FIXME: extra delay */
ac97->bus->ops->write(ac97, AC97_MASTER, 0x8000);
@@ -2307,8 +2303,7 @@ void snd_ac97_resume(ac97_t *ac97)
unsigned short val = snd_ac97_read(ac97, AC97_EXTENDED_MID);
if (val != 0xffff && (val & 1) != 0)
break;
- set_current_state(TASK_UNINTERRUPTIBLE);
- schedule_timeout(1);
+ schedule_timeout_uninterruptible(1);
} while (time_after_eq(end_time, jiffies));
}
__reset_ready:
diff -urpN 2.6.13-rc5-mm1/sound/pci/ali5451/ali5451.c 2.6.13-rc5-mm1-dev/sound/pci/ali5451/ali5451.c
--- 2.6.13-rc5-mm1/sound/pci/ali5451/ali5451.c 2005-08-07 09:58:16.000000000 -0700
+++ 2.6.13-rc5-mm1-dev/sound/pci/ali5451/ali5451.c 2005-08-10 15:34:09.000000000 -0700
@@ -404,10 +404,8 @@ static int snd_ali_codec_ready( ali_t *c
res = snd_ali_5451_peek(codec,port);
if (! (res & 0x8000))
return 0;
- if (sched) {
- set_current_state(TASK_UNINTERRUPTIBLE);
- schedule_timeout(1);
- }
+ if (sched)
+ schedule_timeout_uninterruptible(1);
} while (time_after_eq(end_time, jiffies));
snd_ali_5451_poke(codec, port, res & ~0x8000);
snd_printdd("ali_codec_ready: codec is not ready.\n ");
@@ -427,10 +425,8 @@ static int snd_ali_stimer_ready(ali_t *c
dwChk2 = snd_ali_5451_peek(codec, ALI_STIMER);
if (dwChk2 != dwChk1)
return 0;
- if (sched) {
- set_current_state(TASK_UNINTERRUPTIBLE);
- schedule_timeout(1);
- }
+ if (sched)
+ schedule_timeout_uninterruptible(1);
} while (time_after_eq(end_time, jiffies));
snd_printk("ali_stimer_read: stimer is not ready.\n");
return -EIO;
diff -urpN 2.6.13-rc5-mm1/sound/pci/atiixp.c 2.6.13-rc5-mm1-dev/sound/pci/atiixp.c
--- 2.6.13-rc5-mm1/sound/pci/atiixp.c 2005-08-07 10:05:23.000000000 -0700
+++ 2.6.13-rc5-mm1-dev/sound/pci/atiixp.c 2005-08-10 15:34:17.000000000 -0700
@@ -328,8 +328,7 @@ static int snd_atiixp_update_bits(atiixp
/* delay for one tick */
#define do_delay() do { \
- set_current_state(TASK_UNINTERRUPTIBLE); \
- schedule_timeout(1); \
+ schedule_timeout_uninterruptible(1); \
} while (0)
diff -urpN 2.6.13-rc5-mm1/sound/pci/atiixp_modem.c 2.6.13-rc5-mm1-dev/sound/pci/atiixp_modem.c
--- 2.6.13-rc5-mm1/sound/pci/atiixp_modem.c 2005-08-07 09:58:16.000000000 -0700
+++ 2.6.13-rc5-mm1-dev/sound/pci/atiixp_modem.c 2005-08-10 15:34:24.000000000 -0700
@@ -306,8 +306,7 @@ static int snd_atiixp_update_bits(atiixp
/* delay for one tick */
#define do_delay() do { \
- set_current_state(TASK_UNINTERRUPTIBLE); \
- schedule_timeout(1); \
+ schedule_timeout_uninterruptible(1); \
} while (0)
diff -urpN 2.6.13-rc5-mm1/sound/pci/cs4281.c 2.6.13-rc5-mm1-dev/sound/pci/cs4281.c
--- 2.6.13-rc5-mm1/sound/pci/cs4281.c 2005-08-07 09:58:16.000000000 -0700
+++ 2.6.13-rc5-mm1-dev/sound/pci/cs4281.c 2005-08-10 15:34:48.000000000 -0700
@@ -534,8 +534,7 @@ static void snd_cs4281_delay(unsigned in
delay = 1;
end_time = jiffies + delay;
do {
- set_current_state(TASK_UNINTERRUPTIBLE);
- schedule_timeout(1);
+ schedule_timeout_uninterruptible(1);
} while (time_after_eq(end_time, jiffies));
} else {
udelay(delay);
@@ -544,8 +543,7 @@ static void snd_cs4281_delay(unsigned in
static inline void snd_cs4281_delay_long(void)
{
- set_current_state(TASK_UNINTERRUPTIBLE);
- schedule_timeout(1);
+ schedule_timeout_uninterruptible(1);
}
static inline void snd_cs4281_pokeBA0(cs4281_t *chip, unsigned long offset, unsigned int val)
diff -urpN 2.6.13-rc5-mm1/sound/pci/ens1370.c 2.6.13-rc5-mm1-dev/sound/pci/ens1370.c
--- 2.6.13-rc5-mm1/sound/pci/ens1370.c 2005-08-07 10:05:23.000000000 -0700
+++ 2.6.13-rc5-mm1-dev/sound/pci/ens1370.c 2005-08-10 15:34:55.000000000 -0700
@@ -583,8 +583,7 @@ static void snd_es1370_codec_write(ak453
outw(ES_1370_CODEC_WRITE(reg, val), ES_REG(ensoniq, 1370_CODEC));
return;
}
- set_current_state(TASK_UNINTERRUPTIBLE);
- schedule_timeout(1);
+ schedule_timeout_uninterruptible(1);
} while (time_after(end_time, jiffies));
snd_printk("codec write timeout, status = 0x%x\n", inl(ES_REG(ensoniq, STATUS)));
}
diff -urpN 2.6.13-rc5-mm1/sound/pci/fm801.c 2.6.13-rc5-mm1-dev/sound/pci/fm801.c
--- 2.6.13-rc5-mm1/sound/pci/fm801.c 2005-08-07 09:58:16.000000000 -0700
+++ 2.6.13-rc5-mm1-dev/sound/pci/fm801.c 2005-08-10 15:35:17.000000000 -0700
@@ -1303,8 +1303,7 @@ static int __devinit snd_fm801_create(sn
do {
if ((inw(FM801_REG(chip, AC97_CMD)) & (3<<8)) == (1<<8))
goto __ac97_secondary;
- set_current_state(TASK_UNINTERRUPTIBLE);
- schedule_timeout(1);
+ schedule_timeout_uninterruptible(1);
} while (time_after(timeout, jiffies));
snd_printk("Primary AC'97 codec not found\n");
snd_fm801_free(chip);
@@ -1329,8 +1328,7 @@ static int __devinit snd_fm801_create(sn
goto __ac97_ok;
}
}
- set_current_state(TASK_UNINTERRUPTIBLE);
- schedule_timeout(1);
+ schedule_timeout_uninterruptible(1);
} while (time_after(timeout, jiffies));
}
@@ -1343,8 +1341,7 @@ static int __devinit snd_fm801_create(sn
do {
if ((inw(FM801_REG(chip, AC97_CMD)) & (3<<8)) == (1<<8))
goto __ac97_ok;
- set_current_state(TASK_UNINTERRUPTIBLE);
- schedule_timeout(1);
+ schedule_timeout_uninterruptible(1);
} while (time_after(timeout, jiffies));
snd_printk("Primary AC'97 codec not responding\n");
snd_fm801_free(chip);
diff -urpN 2.6.13-rc5-mm1/sound/pci/ice1712/pontis.c 2.6.13-rc5-mm1-dev/sound/pci/ice1712/pontis.c
--- 2.6.13-rc5-mm1/sound/pci/ice1712/pontis.c 2005-03-01 23:38:13.000000000 -0800
+++ 2.6.13-rc5-mm1-dev/sound/pci/ice1712/pontis.c 2005-08-10 15:35:23.000000000 -0700
@@ -794,8 +794,7 @@ static int __devinit pontis_init(ice1712
/* initialize WM8776 codec */
for (i = 0; i < ARRAY_SIZE(wm_inits); i += 2)
wm_put(ice, wm_inits[i], wm_inits[i+1]);
- set_current_state(TASK_UNINTERRUPTIBLE);
- schedule_timeout(1);
+ schedule_timeout_uninterruptible(1);
for (i = 0; i < ARRAY_SIZE(wm_inits2); i += 2)
wm_put(ice, wm_inits2[i], wm_inits2[i+1]);
diff -urpN 2.6.13-rc5-mm1/sound/pci/intel8x0.c 2.6.13-rc5-mm1-dev/sound/pci/intel8x0.c
--- 2.6.13-rc5-mm1/sound/pci/intel8x0.c 2005-08-07 09:58:16.000000000 -0700
+++ 2.6.13-rc5-mm1-dev/sound/pci/intel8x0.c 2005-08-10 15:35:31.000000000 -0700
@@ -2153,8 +2153,7 @@ static void do_ali_reset(intel8x0_t *chi
}
#define do_delay(chip) do {\
- set_current_state(TASK_UNINTERRUPTIBLE);\
- schedule_timeout(1);\
+ schedule_timeout_uninterruptible(1);\
} while (0)
static int snd_intel8x0_ich_chip_init(intel8x0_t *chip, int probing)
diff -urpN 2.6.13-rc5-mm1/sound/pci/intel8x0m.c 2.6.13-rc5-mm1-dev/sound/pci/intel8x0m.c
--- 2.6.13-rc5-mm1/sound/pci/intel8x0m.c 2005-08-07 09:58:16.000000000 -0700
+++ 2.6.13-rc5-mm1-dev/sound/pci/intel8x0m.c 2005-08-10 15:35:38.000000000 -0700
@@ -934,8 +934,7 @@ static int __devinit snd_intel8x0_mixer(
*/
#define do_delay(chip) do {\
- set_current_state(TASK_UNINTERRUPTIBLE);\
- schedule_timeout(1);\
+ schedule_timeout_uninterruptible(1);\
} while (0)
static int snd_intel8x0m_ich_chip_init(intel8x0_t *chip, int probing)
diff -urpN 2.6.13-rc5-mm1/sound/pci/maestro3.c 2.6.13-rc5-mm1-dev/sound/pci/maestro3.c
--- 2.6.13-rc5-mm1/sound/pci/maestro3.c 2005-08-07 09:58:16.000000000 -0700
+++ 2.6.13-rc5-mm1-dev/sound/pci/maestro3.c 2005-08-12 13:52:25.000000000 -0700
@@ -2075,8 +2075,7 @@ static void snd_m3_ac97_reset(m3_t *chip
outw(0, io + GPIO_DATA);
outw(dir | GPO_PRIMARY_AC97, io + GPIO_DIRECTION);
- set_current_state(TASK_UNINTERRUPTIBLE);
- schedule_timeout((delay1 * HZ) / 1000);
+ schedule_timeout_uninterruptible(msecs_to_jiffies(delay1));
outw(GPO_PRIMARY_AC97, io + GPIO_DATA);
udelay(5);
@@ -2084,8 +2083,7 @@ static void snd_m3_ac97_reset(m3_t *chip
outw(IO_SRAM_ENABLE | SERIAL_AC_LINK_ENABLE, io + RING_BUS_CTRL_A);
outw(~0, io + GPIO_MASK);
- set_current_state(TASK_UNINTERRUPTIBLE);
- schedule_timeout((delay2 * HZ) / 1000);
+ schedule_timeout_uninterruptible(msecs_to_jiffies(delay2));
if (! snd_m3_try_read_vendor(chip))
break;
@@ -2130,8 +2128,7 @@ static int __devinit snd_m3_mixer(m3_t *
/* seems ac97 PCM needs initialization.. hack hack.. */
snd_ac97_write(chip->ac97, AC97_PCM, 0x8000 | (15 << 8) | 15);
- set_current_state(TASK_UNINTERRUPTIBLE);
- schedule_timeout(HZ / 10);
+ schedule_timeout_uninterruptible(msecs_to_jiffies(100));
snd_ac97_write(chip->ac97, AC97_PCM, 0);
memset(&id, 0, sizeof(id));
diff -urpN 2.6.13-rc5-mm1/sound/pci/mixart/mixart.c 2.6.13-rc5-mm1-dev/sound/pci/mixart/mixart.c
--- 2.6.13-rc5-mm1/sound/pci/mixart/mixart.c 2005-08-07 09:58:16.000000000 -0700
+++ 2.6.13-rc5-mm1-dev/sound/pci/mixart/mixart.c 2005-08-10 15:38:31.000000000 -0700
@@ -451,8 +451,7 @@ static int mixart_sync_nonblock_events(m
snd_printk(KERN_ERR "mixart: cannot process nonblock events!\n");
return -EBUSY;
}
- set_current_state(TASK_UNINTERRUPTIBLE);
- schedule_timeout(1);
+ schedule_timeout_uninterruptible(1);
}
return 0;
}
diff -urpN 2.6.13-rc5-mm1/sound/pci/trident/trident_main.c 2.6.13-rc5-mm1-dev/sound/pci/trident/trident_main.c
--- 2.6.13-rc5-mm1/sound/pci/trident/trident_main.c 2005-08-07 09:58:16.000000000 -0700
+++ 2.6.13-rc5-mm1-dev/sound/pci/trident/trident_main.c 2005-08-10 15:38:42.000000000 -0700
@@ -3206,8 +3206,7 @@ static inline void snd_trident_free_game
*/
static inline void do_delay(trident_t *chip)
{
- set_current_state(TASK_UNINTERRUPTIBLE);
- schedule_timeout(1);
+ schedule_timeout_uninterruptible(1);
}
/*
diff -urpN 2.6.13-rc5-mm1/sound/pci/via82xx.c 2.6.13-rc5-mm1-dev/sound/pci/via82xx.c
--- 2.6.13-rc5-mm1/sound/pci/via82xx.c 2005-08-07 10:05:23.000000000 -0700
+++ 2.6.13-rc5-mm1-dev/sound/pci/via82xx.c 2005-08-10 15:38:55.000000000 -0700
@@ -1893,8 +1893,7 @@ static int snd_via82xx_chip_init(via82xx
pci_read_config_byte(chip->pci, VIA_ACLINK_STAT, &pval);
if (pval & VIA_ACLINK_C00_READY) /* primary codec ready */
break;
- set_current_state(TASK_UNINTERRUPTIBLE);
- schedule_timeout(1);
+ schedule_timeout_uninterruptible(1);
} while (time_before(jiffies, end_time));
if ((val = snd_via82xx_codec_xread(chip)) & VIA_REG_AC97_BUSY)
@@ -1913,8 +1912,7 @@ static int snd_via82xx_chip_init(via82xx
chip->ac97_secondary = 1;
goto __ac97_ok2;
}
- set_current_state(TASK_INTERRUPTIBLE);
- schedule_timeout(1);
+ schedule_timeout_interruptible(1);
} while (time_before(jiffies, end_time));
/* This is ok, the most of motherboards have only one codec */
diff -urpN 2.6.13-rc5-mm1/sound/pci/via82xx_modem.c 2.6.13-rc5-mm1-dev/sound/pci/via82xx_modem.c
--- 2.6.13-rc5-mm1/sound/pci/via82xx_modem.c 2005-08-07 09:58:16.000000000 -0700
+++ 2.6.13-rc5-mm1-dev/sound/pci/via82xx_modem.c 2005-08-10 15:39:08.000000000 -0700
@@ -966,8 +966,7 @@ static int snd_via82xx_chip_init(via82xx
pci_read_config_byte(chip->pci, VIA_ACLINK_STAT, &pval);
if (pval & VIA_ACLINK_C00_READY) /* primary codec ready */
break;
- set_current_state(TASK_UNINTERRUPTIBLE);
- schedule_timeout(1);
+ schedule_timeout_uninterruptible(1);
} while (time_before(jiffies, end_time));
if ((val = snd_via82xx_codec_xread(chip)) & VIA_REG_AC97_BUSY)
@@ -985,8 +984,7 @@ static int snd_via82xx_chip_init(via82xx
chip->ac97_secondary = 1;
goto __ac97_ok2;
}
- set_current_state(TASK_INTERRUPTIBLE);
- schedule_timeout(1);
+ schedule_timeout_interruptible(1);
} while (time_before(jiffies, end_time));
/* This is ok, the most of motherboards have only one codec */
diff -urpN 2.6.13-rc5-mm1/sound/pci/ymfpci/ymfpci_main.c 2.6.13-rc5-mm1-dev/sound/pci/ymfpci/ymfpci_main.c
--- 2.6.13-rc5-mm1/sound/pci/ymfpci/ymfpci_main.c 2005-08-07 09:58:16.000000000 -0700
+++ 2.6.13-rc5-mm1-dev/sound/pci/ymfpci/ymfpci_main.c 2005-08-12 13:52:35.000000000 -0700
@@ -92,7 +92,7 @@ static int snd_ymfpci_codec_ready(ymfpci
if ((snd_ymfpci_readw(chip, reg) & 0x8000) == 0)
return 0;
set_current_state(TASK_UNINTERRUPTIBLE);
- schedule_timeout(1);
+ schedule_timeout_uninterruptible(1);
} while (time_before(jiffies, end_time));
snd_printk("codec_ready: codec %i is not ready [0x%x]\n", secondary, snd_ymfpci_readw(chip, reg));
return -EBUSY;
@@ -727,8 +727,7 @@ static void snd_ymfpci_irq_wait(ymfpci_t
init_waitqueue_entry(&wait, current);
add_wait_queue(&chip->interrupt_sleep, &wait);
atomic_inc(&chip->interrupt_sleep_count);
- set_current_state(TASK_UNINTERRUPTIBLE);
- schedule_timeout(HZ/20);
+ schedule_timeout_uninterruptible(msecs_to_jiffies(50));
remove_wait_queue(&chip->interrupt_sleep, &wait);
}
}
diff -urpN 2.6.13-rc5-mm1/sound/usb/usbaudio.c 2.6.13-rc5-mm1-dev/sound/usb/usbaudio.c
--- 2.6.13-rc5-mm1/sound/usb/usbaudio.c 2005-08-07 09:58:16.000000000 -0700
+++ 2.6.13-rc5-mm1-dev/sound/usb/usbaudio.c 2005-08-10 15:39:30.000000000 -0700
@@ -810,8 +810,7 @@ static int wait_clear_urbs(snd_usb_subst
}
if (! alive)
break;
- set_current_state(TASK_UNINTERRUPTIBLE);
- schedule_timeout(1);
+ schedule_timeout_uninterruptible(1);
} while (time_before(jiffies, end_time));
if (alive)
snd_printk(KERN_ERR "timeout: still %d active urbs..\n", alive);
-------------------------------------------------------
SF.Net email is Sponsored by the Better Software Conference & EXPO
September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices
Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA
Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf
^ permalink raw reply [flat|nested] 30+ messages in thread
* [-mm PATCH 11/32] mips: fix-up schedule_timeout() usage
2005-08-15 18:05 [-mm PATCH 0/32] fix-up schedule_timeout() usage Nishanth Aravamudan
` (4 preceding siblings ...)
2005-08-15 18:10 ` [-mm PATCH 06/32] sound: " Nishanth Aravamudan
@ 2005-08-15 18:14 ` Nishanth Aravamudan
2005-08-15 18:15 ` [-mm PATCH 12/32] ppc: " Nishanth Aravamudan
` (11 subsequent siblings)
17 siblings, 0 replies; 30+ messages in thread
From: Nishanth Aravamudan @ 2005-08-15 18:14 UTC (permalink / raw)
To: ralf; +Cc: akpm, linux-mips
Description: Use schedule_timeout_interruptible() instead of
set_current_state()/schedule_timeout() to reduce kernel size. Also,
replace custom timespectojiffies() function with globally availabe
timespec_to_jiffies().
Signed-off-by: Nishanth Aravamudan <nacc@us.ibm.com>
---
arch/mips/kernel/irixsig.c | 17 ++---------------
arch/mips/kernel/sysirix.c | 3 +--
2 files changed, 3 insertions(+), 17 deletions(-)
diff -urpN 2.6.13-rc5-mm1/arch/mips/kernel/irixsig.c 2.6.13-rc5-mm1-dev/arch/mips/kernel/irixsig.c
--- 2.6.13-rc5-mm1/arch/mips/kernel/irixsig.c 2005-08-07 09:57:44.000000000 -0700
+++ 2.6.13-rc5-mm1-dev/arch/mips/kernel/irixsig.c 2005-08-11 15:43:36.000000000 -0700
@@ -441,18 +441,6 @@ struct irix5_siginfo {
} stuff;
};
-static inline unsigned long timespectojiffies(struct timespec *value)
-{
- unsigned long sec = (unsigned) value->tv_sec;
- long nsec = value->tv_nsec;
-
- if (sec > (LONG_MAX / HZ))
- return LONG_MAX;
- nsec += 1000000000L / HZ - 1;
- nsec /= 1000000000L / HZ;
- return HZ * sec + nsec;
-}
-
asmlinkage int irix_sigpoll_sys(unsigned long *set, struct irix5_siginfo *info,
struct timespec *tp)
{
@@ -490,14 +478,13 @@ asmlinkage int irix_sigpoll_sys(unsigned
error = -EINVAL;
goto out;
}
- expire = timespectojiffies(tp)+(tp->tv_sec||tp->tv_nsec);
+ expire = timespec_to_jiffies(tp) + (tp->tv_sec||tp->tv_nsec);
}
while(1) {
long tmp = 0;
- current->state = TASK_INTERRUPTIBLE;
- expire = schedule_timeout(expire);
+ expire = schedule_timeout_interruptible(expire);
for (i=0; i<=4; i++)
tmp |= (current->pending.signal.sig[i] & kset.sig[i]);
diff -urpN 2.6.13-rc5-mm1/arch/mips/kernel/sysirix.c 2.6.13-rc5-mm1-dev/arch/mips/kernel/sysirix.c
--- 2.6.13-rc5-mm1/arch/mips/kernel/sysirix.c 2005-08-07 09:57:22.000000000 -0700
+++ 2.6.13-rc5-mm1-dev/arch/mips/kernel/sysirix.c 2005-08-11 15:46:57.000000000 -0700
@@ -1035,8 +1029,7 @@ bad:
asmlinkage int irix_sginap(int ticks)
{
- current->state = TASK_INTERRUPTIBLE;
- schedule_timeout(ticks);
+ schedule_timeout_interruptible(ticks);
return 0;
}
^ permalink raw reply [flat|nested] 30+ messages in thread
* [-mm PATCH 12/32] ppc: fix-up schedule_timeout() usage
2005-08-15 18:05 [-mm PATCH 0/32] fix-up schedule_timeout() usage Nishanth Aravamudan
` (5 preceding siblings ...)
2005-08-15 18:14 ` [-mm PATCH 11/32] mips: " Nishanth Aravamudan
@ 2005-08-15 18:15 ` Nishanth Aravamudan
2005-08-15 18:16 ` [uml-devel] [-mm PATCH 14/32] um: " Nishanth Aravamudan
` (10 subsequent siblings)
17 siblings, 0 replies; 30+ messages in thread
From: Nishanth Aravamudan @ 2005-08-15 18:15 UTC (permalink / raw)
To: paulus; +Cc: akpm, linuxppc-dev
Description: Use schedule_timeout_interruptible() instead of
set_current_state()/schedule_timeout() to reduce kernel size. Also use
human-time conversion functions instead of hard-coded HZ division to
avoid rounding errors.
Signed-off-by: Nishanth Aravamudan <nacc@us.ibm.com>
---
arch/ppc/4xx_io/serial_sicc.c | 17 +++++++----------
arch/ppc/8260_io/fcc_enet.c | 3 +--
2 files changed, 8 insertions(+), 12 deletions(-)
diff -urpN 2.6.13-rc5-mm1/arch/ppc/4xx_io/serial_sicc.c 2.6.13-rc5-mm1-dev/arch/ppc/4xx_io/serial_sicc.c
--- 2.6.13-rc5-mm1/arch/ppc/4xx_io/serial_sicc.c 2005-03-01 23:37:30.000000000 -0800
+++ 2.6.13-rc5-mm1-dev/arch/ppc/4xx_io/serial_sicc.c 2005-08-11 15:55:47.000000000 -0700
@@ -1145,8 +1145,8 @@ static int set_serial_info(struct SICC_i
info->flags = ((state->flags & ~ASYNC_INTERNAL_FLAGS) |
(info->flags & ASYNC_INTERNAL_FLAGS));
state->custom_divisor = new_serial.custom_divisor;
- state->close_delay = new_serial.close_delay * HZ / 100;
- state->closing_wait = new_serial.closing_wait * HZ / 100;
+ state->close_delay = msecs_to_jiffies(10 * new_serial.close_delay);
+ state->closing_wait = msecs_to_jiffies(10 * new_serial.closing_wait);
info->tty->low_latency = (info->flags & ASYNC_LOW_LATENCY) ? 1 : 0;
port->fifosize = new_serial.xmit_fifo_size;
@@ -1465,10 +1465,8 @@ static void siccuart_close(struct tty_st
info->event = 0;
info->tty = NULL;
if (info->blocked_open) {
- if (info->state->close_delay) {
- set_current_state(TASK_INTERRUPTIBLE);
- schedule_timeout(info->state->close_delay);
- }
+ if (info->state->close_delay)
+ schedule_timeout_interruptible(info->state->close_delay);
wake_up_interruptible(&info->open_wait);
}
info->flags &= ~(ASYNC_NORMAL_ACTIVE|ASYNC_CLOSING);
@@ -1496,7 +1494,7 @@ static void siccuart_wait_until_sent(str
* Note: we have to use pretty tight timings here to satisfy
* the NIST-PCTS.
*/
- char_time = (info->timeout - HZ/50) / info->port->fifosize;
+ char_time = (info->timeout - msecs_to_jiffies(20)) / info->port->fifosize;
char_time = char_time / 5;
if (char_time == 0)
char_time = 1;
@@ -1521,8 +1519,7 @@ static void siccuart_wait_until_sent(str
tty->index, jiffies,
expire, char_time);
while ((readb(info->port->uart_base + BL_SICC_LSR) & _LSR_TX_ALL) != _LSR_TX_ALL) {
- set_current_state(TASK_INTERRUPTIBLE);
- schedule_timeout(char_time);
+ schedule_timeout_interruptible(char_time);
if (signal_pending(current))
break;
if (timeout && time_after(jiffies, expire))
@@ -1773,7 +1770,7 @@ int __init siccuart_init(void)
for (i = 0; i < SERIAL_SICC_NR; i++) {
struct SICC_state *state = sicc_state + i;
state->line = i;
- state->close_delay = 5 * HZ / 10;
+ state->close_delay = msecs_to_jiffies(500);
state->closing_wait = 30 * HZ;
spin_lock_init(&state->sicc_lock);
}
diff -urpN 2.6.13-rc5-mm1/arch/ppc/8260_io/fcc_enet.c 2.6.13-rc5-mm1-dev/arch/ppc/8260_io/fcc_enet.c
--- 2.6.13-rc5-mm1/arch/ppc/8260_io/fcc_enet.c 2005-08-07 09:57:22.000000000 -0700
+++ 2.6.13-rc5-mm1-dev/arch/ppc/8260_io/fcc_enet.c 2005-08-08 13:54:41.000000000 -0700
@@ -1309,8 +1309,7 @@ static void mii_dm9161_wait(uint mii_reg
/* Davicom takes a bit to come up after a reset,
* so wait here for a bit */
- set_current_state(TASK_UNINTERRUPTIBLE);
- schedule_timeout(timeout);
+ schedule_timeout_uninterruptible(timeout);
}
static phy_info_t phy_info_dm9161 = {
^ permalink raw reply [flat|nested] 30+ messages in thread
* [uml-devel] [-mm PATCH 14/32] um: fix-up schedule_timeout() usage
2005-08-15 18:05 [-mm PATCH 0/32] fix-up schedule_timeout() usage Nishanth Aravamudan
` (6 preceding siblings ...)
2005-08-15 18:15 ` [-mm PATCH 12/32] ppc: " Nishanth Aravamudan
@ 2005-08-15 18:16 ` Nishanth Aravamudan
2005-08-15 18:54 ` Jeff Dike
[not found] ` <20050815180514.GC2854-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org>
` (9 subsequent siblings)
17 siblings, 1 reply; 30+ messages in thread
From: Nishanth Aravamudan @ 2005-08-15 18:16 UTC (permalink / raw)
To: jdike; +Cc: akpm, user-mode-linux-devel
Description: Use schedule_timeout_interruptible() instead of
set_current_state()/schedule_timeout() to reduce kernel size.
Signed-off-by: Nishanth Aravamudan <nacc@us.ibm.com>
---
arch/um/drivers/random.c | 6 ++----
1 files changed, 2 insertions(+), 4 deletions(-)
diff -urpN 2.6.13-rc5-mm1/arch/um/drivers/random.c 2.6.13-rc5-mm1-dev/arch/um/drivers/random.c
--- 2.6.13-rc5-mm1/arch/um/drivers/random.c 2005-08-07 09:57:22.000000000 -0700
+++ 2.6.13-rc5-mm1-dev/arch/um/drivers/random.c 2005-08-08 13:55:26.000000000 -0700
@@ -58,10 +58,8 @@ static ssize_t rng_dev_read (struct file
if (filp->f_flags & O_NONBLOCK)
return ret ? : -EAGAIN;
- if(need_resched()){
- current->state = TASK_INTERRUPTIBLE;
- schedule_timeout(1);
- }
+ if(need_resched())
+ schedule_timeout_interruptible(1);
}
else return n;
if (signal_pending (current))
-------------------------------------------------------
SF.Net email is Sponsored by the Better Software Conference & EXPO
September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices
Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA
Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf
_______________________________________________
User-mode-linux-devel mailing list
User-mode-linux-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel
^ permalink raw reply [flat|nested] 30+ messages in thread
* [-mm PATCH 15/32] drivers/acpi: fix-up schedule_timeout() usage
[not found] ` <20050815180514.GC2854-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org>
2005-08-15 18:10 ` [-mm PATCH 05/32] net: " Nishanth Aravamudan
@ 2005-08-15 18:16 ` Nishanth Aravamudan
1 sibling, 0 replies; 30+ messages in thread
From: Nishanth Aravamudan @ 2005-08-15 18:16 UTC (permalink / raw)
To: len.brown-ral2JQCrhuEAvxtiuMwx3w
Cc: acpi-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f, akpm-3NddpPZAyC0
Description: Use schedule_timeout_interruptible() instead of
set_current_state()/schedule_timeout() to reduce kernel size. Also use
msecs_to_jiffies() instead of direct HZ division to avoid rounding
errors.
Signed-off-by: Nishanth Aravamudan <nacc-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org>
---
drivers/acpi/osl.c | 6 ++----
1 files changed, 2 insertions(+), 4 deletions(-)
diff -urpN 2.6.13-rc5-mm1/drivers/acpi/osl.c 2.6.13-rc5-mm1-dev/drivers/acpi/osl.c
--- 2.6.13-rc5-mm1/drivers/acpi/osl.c 2005-08-07 10:05:19.000000000 -0700
+++ 2.6.13-rc5-mm1-dev/drivers/acpi/osl.c 2005-08-12 13:20:41.000000000 -0700
@@ -315,8 +315,7 @@ acpi_status acpi_os_remove_interrupt_han
void acpi_os_sleep(acpi_integer ms)
{
- current->state = TASK_INTERRUPTIBLE;
- schedule_timeout(((signed long)ms * HZ) / 1000);
+ schedule_timeout_interruptible(msecs_to_jiffies(ms));
}
EXPORT_SYMBOL(acpi_os_sleep);
@@ -866,8 +865,7 @@ acpi_status acpi_os_wait_semaphore(acpi_
ret = down_trylock(sem);
for (i = timeout; (i > 0 && ret < 0); i -= quantum_ms) {
- current->state = TASK_INTERRUPTIBLE;
- schedule_timeout(1);
+ schedule_timeout_interruptible(1);
ret = down_trylock(sem);
}
-------------------------------------------------------
SF.Net email is Sponsored by the Better Software Conference & EXPO
September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices
Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA
Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf
^ permalink raw reply [flat|nested] 30+ messages in thread
* Re: [xfs-masters] [-mm PATCH 2/32] fs: fix-up schedule_timeout() usage
2005-08-15 18:08 ` [-mm PATCH 2/32] fs: fix-up schedule_timeout() usage Nishanth Aravamudan
@ 2005-08-15 18:17 ` Christoph Hellwig
2005-08-15 18:40 ` Nishanth Aravamudan
2005-08-15 18:37 ` Stephen C. Tweedie
2005-08-15 20:23 ` Steven French
2 siblings, 1 reply; 30+ messages in thread
From: Christoph Hellwig @ 2005-08-15 18:17 UTC (permalink / raw)
To: xfs-masters
Cc: sfrench, sct, okir, trond.myklebust, reiserfs-dev, urban, nathans,
akpm, samba-technical, linux-kernel, reiserfs-list, samba,
linux-xfs
On Mon, Aug 15, 2005 at 11:08:04AM -0700, Nishanth Aravamudan wrote:
> Description: Use schedule_timeout_{,un}interruptible() instead of
> set_current_state()/schedule_timeout() to reduce kernel size. Also use
> helper functions to convert between human time units and jiffies rather
> than constant HZ division to avoid rounding errors.
The XFS changes are still wrong for the same rason as last time,
we actually do want the daemons to do work if they're woken earlier
using wake_up_process.
^ permalink raw reply [flat|nested] 30+ messages in thread
* [-mm PATCH 17/32] drivers/cdrom: fix-up schedule_timeout() usage
2005-08-15 18:05 [-mm PATCH 0/32] fix-up schedule_timeout() usage Nishanth Aravamudan
` (8 preceding siblings ...)
[not found] ` <20050815180514.GC2854-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org>
@ 2005-08-15 18:18 ` Nishanth Aravamudan
2005-08-15 18:19 ` [-mm PATCH 19/32] drivers/dlm: " Nishanth Aravamudan
` (7 subsequent siblings)
17 siblings, 0 replies; 30+ messages in thread
From: Nishanth Aravamudan @ 2005-08-15 18:18 UTC (permalink / raw)
To: axboe, emoenke; +Cc: akpm, linux-kernel
Description: Use schedule_timeout_{un,}interruptible() instead of
set_current_state()/schedule_timeout() to reduce kernel size.
Signed-off-by: Nishanth Aravamudan <nacc@us.ibm.com>
---
drivers/cdrom/sbpcd.c | 3 +--
drivers/cdrom/sonycd535.c | 3 +--
2 files changed, 2 insertions(+), 4 deletions(-)
diff -urpN 2.6.13-rc5-mm1/drivers/cdrom/sbpcd.c 2.6.13-rc5-mm1-dev/drivers/cdrom/sbpcd.c
--- 2.6.13-rc5-mm1/drivers/cdrom/sbpcd.c 2005-08-07 10:05:20.000000000 -0700
+++ 2.6.13-rc5-mm1-dev/drivers/cdrom/sbpcd.c 2005-08-08 14:18:39.000000000 -0700
@@ -827,8 +827,7 @@ static void mark_timeout_audio(u_long i)
static void sbp_sleep(u_int time)
{
sti();
- current->state = TASK_INTERRUPTIBLE;
- schedule_timeout(time);
+ schedule_interruptible_timeout(time);
sti();
}
/*==========================================================================*/
diff -urpN 2.6.13-rc5-mm1/drivers/cdrom/sonycd535.c 2.6.13-rc5-mm1-dev/drivers/cdrom/sonycd535.c
--- 2.6.13-rc5-mm1/drivers/cdrom/sonycd535.c 2005-08-07 09:57:49.000000000 -0700
+++ 2.6.13-rc5-mm1-dev/drivers/cdrom/sonycd535.c 2005-08-12 13:30:50.000000000 -0700
@@ -1478,8 +1477,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);
+ schedule_timeout_interruptible((HZ+17)*40/18);
inb(result_reg);
outb(0, read_status_reg); /* does a reset? */
^ permalink raw reply [flat|nested] 30+ messages in thread
* [-mm PATCH 19/32] drivers/dlm: fix-up schedule_timeout() usage
2005-08-15 18:05 [-mm PATCH 0/32] fix-up schedule_timeout() usage Nishanth Aravamudan
` (9 preceding siblings ...)
2005-08-15 18:18 ` [-mm PATCH 17/32] drivers/cdrom: " Nishanth Aravamudan
@ 2005-08-15 18:19 ` Nishanth Aravamudan
2005-08-15 18:23 ` [-mm PATCH 23/32] drivers/macintosh: " Nishanth Aravamudan
` (6 subsequent siblings)
17 siblings, 0 replies; 30+ messages in thread
From: Nishanth Aravamudan @ 2005-08-15 18:19 UTC (permalink / raw)
To: akpm; +Cc: linux-kernel
Description: Use schedule_timeout_interruptible() instead of
set_current_state()/schedule_timeout() to reduce kernel size.
Signed-off-by: Nishanth Aravamudan <nacc@us.ibm.com>
---
drivers/dlm/lockspace.c | 3 +--
1 files changed, 1 insertion(+), 2 deletions(-)
diff -urpN 2.6.13-rc5-mm1/drivers/dlm/lockspace.c 2.6.13-rc5-mm1-dev/drivers/dlm/lockspace.c
--- 2.6.13-rc5-mm1/drivers/dlm/lockspace.c 2005-08-07 10:05:20.000000000 -0700
+++ 2.6.13-rc5-mm1-dev/drivers/dlm/lockspace.c 2005-08-08 14:34:39.000000000 -0700
@@ -54,8 +54,7 @@ static int dlm_scand(void *data)
while (!kthread_should_stop()) {
list_for_each_entry(ls, &lslist, ls_list)
dlm_scan_rsbs(ls);
- set_current_state(TASK_INTERRUPTIBLE);
- schedule_timeout(dlm_config.scan_secs * HZ);
+ schedule_timeout_interruptible(dlm_config.scan_secs * HZ);
}
return 0;
}
^ permalink raw reply [flat|nested] 30+ messages in thread
* [-mm PATCH 23/32] drivers/macintosh: fix-up schedule_timeout() usage
2005-08-15 18:05 [-mm PATCH 0/32] fix-up schedule_timeout() usage Nishanth Aravamudan
` (10 preceding siblings ...)
2005-08-15 18:19 ` [-mm PATCH 19/32] drivers/dlm: " Nishanth Aravamudan
@ 2005-08-15 18:23 ` Nishanth Aravamudan
2005-08-15 18:24 ` [-mm PATCH 24/32] drivers/md: " Nishanth Aravamudan
` (5 subsequent siblings)
17 siblings, 0 replies; 30+ messages in thread
From: Nishanth Aravamudan @ 2005-08-15 18:23 UTC (permalink / raw)
To: benh; +Cc: akpm, linuxppc-dev
Description: Use schedule_timeout_interruptible() instead of
set_current_state()/schedule_timeout() to reduce kernel size.
Signed-off-by: Nishanth Aravamudan <nacc@us.ibm.com>
---
arch/m68k/atari/time.c | 6 ++----
1 files changed, 2 insertions(+), 4 deletions(-)
diff -urpN 2.6.13-rc5-mm1/drivers/macintosh/therm_pm72.c 2.6.13-rc5-mm1-dev/drivers/macintosh/therm_pm72.c
--- 2.6.13-rc5-mm1/drivers/macintosh/therm_pm72.c 2005-08-07 09:57:58.000000000 -0700
+++ 2.6.13-rc5-mm1-dev/drivers/macintosh/therm_pm72.c 2005-08-08 15:06:08.000000000 -0700
@@ -1678,10 +1678,9 @@ static int main_control_loop(void *x)
}
// FIXME: Deal with signals
- set_current_state(TASK_INTERRUPTIBLE);
elapsed = jiffies - start;
if (elapsed < HZ)
- schedule_timeout(HZ - elapsed);
+ schedule_timeout_interruptible(HZ - elapsed);
}
out:
^ permalink raw reply [flat|nested] 30+ messages in thread
* [-mm PATCH 24/32] drivers/md: fix-up schedule_timeout() usage
2005-08-15 18:05 [-mm PATCH 0/32] fix-up schedule_timeout() usage Nishanth Aravamudan
` (11 preceding siblings ...)
2005-08-15 18:23 ` [-mm PATCH 23/32] drivers/macintosh: " Nishanth Aravamudan
@ 2005-08-15 18:24 ` Nishanth Aravamudan
2005-08-15 18:25 ` [-mm PATCH 26/32] message: " Nishanth Aravamudan
` (4 subsequent siblings)
17 siblings, 0 replies; 30+ messages in thread
From: Nishanth Aravamudan @ 2005-08-15 18:24 UTC (permalink / raw)
To: mingo, neilb; +Cc: akpm, linux-raid
Description: Use schedule_timeout_interruptible() instead of
set_current_state()/schedule_timeout() to reduce kernel size.
Signed-off-by: Nishanth Aravamudan <nacc@us.ibm.com>
---
drivers/md/raid5.c | 3 +--
drivers/md/raid6main.c | 3 +--
2 files changed, 2 insertions(+), 4 deletions(-)
diff -urpN 2.6.13-rc5-mm1/drivers/md/raid5.c 2.6.13-rc5-mm1-dev/drivers/md/raid5.c
--- 2.6.13-rc5-mm1/drivers/md/raid5.c 2005-08-07 10:05:20.000000000 -0700
+++ 2.6.13-rc5-mm1-dev/drivers/md/raid5.c 2005-08-08 15:06:49.000000000 -0700
@@ -1522,8 +1522,7 @@ static sector_t sync_request(mddev_t *md
/* make sure we don't swamp the stripe cache if someone else
* is trying to get access
*/
- set_current_state(TASK_UNINTERRUPTIBLE);
- schedule_timeout(1);
+ schedule_timeout_uninterruptible(1);
}
spin_lock(&sh->lock);
set_bit(STRIPE_SYNCING, &sh->state);
diff -urpN 2.6.13-rc5-mm1/drivers/md/raid6main.c 2.6.13-rc5-mm1-dev/drivers/md/raid6main.c
--- 2.6.13-rc5-mm1/drivers/md/raid6main.c 2005-08-07 10:05:20.000000000 -0700
+++ 2.6.13-rc5-mm1-dev/drivers/md/raid6main.c 2005-08-08 15:06:55.000000000 -0700
@@ -1681,8 +1681,7 @@ static sector_t sync_request(mddev_t *md
/* make sure we don't swamp the stripe cache if someone else
* is trying to get access
*/
- set_current_state(TASK_UNINTERRUPTIBLE);
- schedule_timeout(1);
+ schedule_timeout_uninterruptible(1);
}
spin_lock(&sh->lock);
set_bit(STRIPE_SYNCING, &sh->state);
^ permalink raw reply [flat|nested] 30+ messages in thread
* [-mm PATCH 26/32] message: fix-up schedule_timeout() usage
2005-08-15 18:05 [-mm PATCH 0/32] fix-up schedule_timeout() usage Nishanth Aravamudan
` (12 preceding siblings ...)
2005-08-15 18:24 ` [-mm PATCH 24/32] drivers/md: " Nishanth Aravamudan
@ 2005-08-15 18:25 ` Nishanth Aravamudan
2005-08-15 18:26 ` [-mm PATCH 28/32] drivers/sbus: " Nishanth Aravamudan
` (3 subsequent siblings)
17 siblings, 0 replies; 30+ messages in thread
From: Nishanth Aravamudan @ 2005-08-15 18:25 UTC (permalink / raw)
To: markus.lidel; +Cc: akpm, linux-kernel
Description: Use schedule_timeout_interruptible() instead of
set_current_state()/schedule_timeout() to reduce kernel size.
Signed-off-by: Nishanth Aravamudan <nacc@us.ibm.com>
---
drivers/message/fusion/mptlan.c | 10 ++++------
drivers/message/fusion/mptscsih.c | 6 ++----
drivers/message/i2o/iop.c | 15 +++++----------
3 files changed, 11 insertions(+), 20 deletions(-)
diff -urpN 2.6.13-rc5-mm1/drivers/message/fusion/mptlan.c 2.6.13-rc5-mm1-dev/drivers/message/fusion/mptlan.c
--- 2.6.13-rc5-mm1/drivers/message/fusion/mptlan.c 2005-08-07 09:57:59.000000000 -0700
+++ 2.6.13-rc5-mm1-dev/drivers/message/fusion/mptlan.c 2005-08-08 15:49:30.000000000 -0700
@@ -506,7 +506,7 @@ mpt_lan_close(struct net_device *dev)
{
struct mpt_lan_priv *priv = netdev_priv(dev);
MPT_ADAPTER *mpt_dev = priv->mpt_dev;
- unsigned int timeout;
+ unsigned long timeout;
int i;
dlprintk((KERN_INFO MYNAM ": mpt_lan_close called\n"));
@@ -521,11 +521,9 @@ mpt_lan_close(struct net_device *dev)
mpt_lan_reset(dev);
- timeout = 2 * HZ;
- while (atomic_read(&priv->buckets_out) && --timeout) {
- set_current_state(TASK_INTERRUPTIBLE);
- schedule_timeout(1);
- }
+ timeout = jiffies + 2 * HZ;
+ while (atomic_read(&priv->buckets_out) && time_before(jiffies, timeout))
+ schedule_timeout_interruptible(1);
for (i = 0; i < priv->max_buckets_out; i++) {
if (priv->RcvCtl[i].skb != NULL) {
diff -urpN 2.6.13-rc5-mm1/drivers/message/fusion/mptscsih.c 2.6.13-rc5-mm1-dev/drivers/message/fusion/mptscsih.c
--- 2.6.13-rc5-mm1/drivers/message/fusion/mptscsih.c 2005-08-07 10:05:20.000000000 -0700
+++ 2.6.13-rc5-mm1-dev/drivers/message/fusion/mptscsih.c 2005-08-08 15:52:12.000000000 -0700
@@ -974,10 +974,8 @@ mptscsih_remove(struct pci_dev *pdev)
spin_lock_irqsave(&dvtaskQ_lock, flags);
if (dvtaskQ_active) {
spin_unlock_irqrestore(&dvtaskQ_lock, flags);
- while(dvtaskQ_active && --count) {
- set_current_state(TASK_INTERRUPTIBLE);
- schedule_timeout(1);
- }
+ while(dvtaskQ_active && --count)
+ schedule_timeout_interruptible(1);
} else {
spin_unlock_irqrestore(&dvtaskQ_lock, flags);
}
diff -urpN 2.6.13-rc5-mm1/drivers/message/i2o/iop.c 2.6.13-rc5-mm1-dev/drivers/message/i2o/iop.c
--- 2.6.13-rc5-mm1/drivers/message/i2o/iop.c 2005-08-07 09:58:00.000000000 -0700
+++ 2.6.13-rc5-mm1-dev/drivers/message/i2o/iop.c 2005-08-08 15:53:24.000000000 -0700
@@ -92,8 +92,7 @@ u32 i2o_msg_get_wait(struct i2o_controll
c->name);
return I2O_QUEUE_EMPTY;
}
- set_current_state(TASK_UNINTERRUPTIBLE);
- schedule_timeout(1);
+ schedule_timeout_uninterruptible(1);
}
return m;
@@ -484,8 +483,7 @@ static int i2o_iop_init_outbound_queue(s
osm_warn("%s: Timeout Initializing\n", c->name);
return -ETIMEDOUT;
}
- set_current_state(TASK_UNINTERRUPTIBLE);
- schedule_timeout(1);
+ schedule_timeout_uninterruptible(1);
}
m = c->out_queue.phys;
@@ -547,8 +545,7 @@ static int i2o_iop_reset(struct i2o_cont
if (time_after(jiffies, timeout))
break;
- set_current_state(TASK_UNINTERRUPTIBLE);
- schedule_timeout(1);
+ schedule_timeout_uninterruptible(1);
}
switch (*status) {
@@ -576,8 +573,7 @@ static int i2o_iop_reset(struct i2o_cont
rc = -ETIMEDOUT;
goto exit;
}
- set_current_state(TASK_UNINTERRUPTIBLE);
- schedule_timeout(1);
+ schedule_timeout_uninterruptible(1);
m = i2o_msg_get_wait(c, &msg, I2O_TIMEOUT_RESET);
}
@@ -987,8 +983,7 @@ int i2o_status_get(struct i2o_controller
return -ETIMEDOUT;
}
- set_current_state(TASK_UNINTERRUPTIBLE);
- schedule_timeout(1);
+ schedule_timeout_uninterruptible(1);
}
#ifdef DEBUG
^ permalink raw reply [flat|nested] 30+ messages in thread
* [-mm PATCH 28/32] drivers/sbus: fix-up schedule_timeout() usage
2005-08-15 18:05 [-mm PATCH 0/32] fix-up schedule_timeout() usage Nishanth Aravamudan
` (13 preceding siblings ...)
2005-08-15 18:25 ` [-mm PATCH 26/32] message: " Nishanth Aravamudan
@ 2005-08-15 18:26 ` Nishanth Aravamudan
2005-08-15 18:27 ` [-mm PATCH 29/32] drivers/scsi: " Nishanth Aravamudan
` (2 subsequent siblings)
17 siblings, 0 replies; 30+ messages in thread
From: Nishanth Aravamudan @ 2005-08-15 18:26 UTC (permalink / raw)
To: akpm; +Cc: linux-kernel
Description: Use schedule_timeout_uninterruptible() instead of
set_current_state()/schedule_timeout() to reduce kernel size.
Signed-off-by: Nishanth Aravamudan <nacc@us.ibm.com>
---
drivers/sbus/char/bpp.c | 3 +--
drivers/sbus/char/vfc_i2c.c | 3 +--
2 files changed, 2 insertions(+), 4 deletions(-)
diff -urpN 2.6.13-rc5-mm1/drivers/sbus/char/bpp.c 2.6.13-rc5-mm1-dev/drivers/sbus/char/bpp.c
--- 2.6.13-rc5-mm1/drivers/sbus/char/bpp.c 2005-08-07 09:58:07.000000000 -0700
+++ 2.6.13-rc5-mm1-dev/drivers/sbus/char/bpp.c 2005-08-10 14:20:34.000000000 -0700
@@ -295,8 +295,7 @@ static unsigned short get_pins(unsigned
static void snooze(unsigned long snooze_time, unsigned minor)
{
- set_current_state(TASK_UNINTERRUPTIBLE);
- schedule_timeout(snooze_time + 1);
+ schedule_timeout_uninterruptible(snooze_time + 1);
}
static int wait_for(unsigned short set, unsigned short clr,
diff -urpN 2.6.13-rc5-mm1/drivers/sbus/char/vfc_i2c.c 2.6.13-rc5-mm1-dev/drivers/sbus/char/vfc_i2c.c
--- 2.6.13-rc5-mm1/drivers/sbus/char/vfc_i2c.c 2005-08-07 10:05:21.000000000 -0700
+++ 2.6.13-rc5-mm1-dev/drivers/sbus/char/vfc_i2c.c 2005-08-10 14:20:42.000000000 -0700
@@ -81,8 +81,7 @@ int vfc_pcf8584_init(struct vfc_dev *dev
void vfc_i2c_delay_no_busy(struct vfc_dev *dev, unsigned long usecs)
{
- set_current_state(TASK_UNINTERRUPTIBLE);
- schedule_timeout(usecs_to_jiffies(usecs));
+ schedule_timeout_uninterruptible(usecs_to_jiffies(usecs));
}
void inline vfc_i2c_delay(struct vfc_dev *dev)
^ permalink raw reply [flat|nested] 30+ messages in thread
* [-mm PATCH 29/32] drivers/scsi: fix-up schedule_timeout() usage
2005-08-15 18:05 [-mm PATCH 0/32] fix-up schedule_timeout() usage Nishanth Aravamudan
` (14 preceding siblings ...)
2005-08-15 18:26 ` [-mm PATCH 28/32] drivers/sbus: " Nishanth Aravamudan
@ 2005-08-15 18:27 ` Nishanth Aravamudan
2005-08-15 20:34 ` Willem Riede
2005-08-15 18:28 ` [-mm PATCH 30/32] serial: " Nishanth Aravamudan
2005-08-15 18:29 ` [-mm PATCH 31/32] telephony: " Nishanth Aravamudan
17 siblings, 1 reply; 30+ messages in thread
From: Nishanth Aravamudan @ 2005-08-15 18:27 UTC (permalink / raw)
To: James.Bottomley, matthew, markus.lidel, osst, andrew.vasquez
Cc: akpm, linux-scsi
Description: Use schedule_timeout_uninterruptible() instead of
set_current_state()/schedule_timeout() to reduce kernel size.
Signed-off-by: Nishanth Aravamudan <nacc@us.ibm.com>
---
drivers/scsi/NCR5380.c | 5 +----
drivers/scsi/aacraid/rkt.c | 6 ++----
drivers/scsi/aacraid/rx.c | 6 ++----
drivers/scsi/aacraid/sa.c | 6 ++----
drivers/scsi/dpt_i2o.c | 34 +++++++++++-----------------------
drivers/scsi/lpfc/lpfc_scsi.c | 12 ++++--------
drivers/scsi/osst.c | 9 +++------
drivers/scsi/qla2xxx/qla_os.c | 11 ++++-------
8 files changed, 29 insertions(+), 60 deletions(-)
diff -urpN 2.6.13-rc5-mm1/drivers/scsi/aacraid/rkt.c 2.6.13-rc5-mm1-dev/drivers/scsi/aacraid/rkt.c
--- 2.6.13-rc5-mm1/drivers/scsi/aacraid/rkt.c 2005-08-07 10:05:21.000000000 -0700
+++ 2.6.13-rc5-mm1-dev/drivers/scsi/aacraid/rkt.c 2005-08-10 14:21:10.000000000 -0700
@@ -166,8 +166,7 @@ static int rkt_sync_cmd(struct aac_dev *
/*
* Yield the processor in case we are slow
*/
- set_current_state(TASK_UNINTERRUPTIBLE);
- schedule_timeout(1);
+ schedule_timeout_uninterruptible(1);
}
if (ok != 1) {
/*
@@ -410,8 +409,7 @@ int aac_rkt_init(struct aac_dev *dev)
dev->name, instance, status);
goto error_iounmap;
}
- set_current_state(TASK_UNINTERRUPTIBLE);
- schedule_timeout(1);
+ schedule_timeout_uninterruptible(1);
}
if (request_irq(dev->scsi_host_ptr->irq, aac_rkt_intr, SA_SHIRQ|SA_INTERRUPT, "aacraid", (void *)dev)<0)
{
diff -urpN 2.6.13-rc5-mm1/drivers/scsi/aacraid/rx.c 2.6.13-rc5-mm1-dev/drivers/scsi/aacraid/rx.c
--- 2.6.13-rc5-mm1/drivers/scsi/aacraid/rx.c 2005-08-07 10:05:21.000000000 -0700
+++ 2.6.13-rc5-mm1-dev/drivers/scsi/aacraid/rx.c 2005-08-10 14:21:23.000000000 -0700
@@ -166,8 +166,7 @@ static int rx_sync_cmd(struct aac_dev *d
/*
* Yield the processor in case we are slow
*/
- set_current_state(TASK_UNINTERRUPTIBLE);
- schedule_timeout(1);
+ schedule_timeout_uninterruptible(1);
}
if (ok != 1) {
/*
@@ -410,8 +409,7 @@ int aac_rx_init(struct aac_dev *dev)
dev->name, instance, status);
goto error_iounmap;
}
- set_current_state(TASK_UNINTERRUPTIBLE);
- schedule_timeout(1);
+ schedule_timeout_uninterruptible(1);
}
if (request_irq(dev->scsi_host_ptr->irq, aac_rx_intr, SA_SHIRQ|SA_INTERRUPT, "aacraid", (void *)dev)<0)
{
diff -urpN 2.6.13-rc5-mm1/drivers/scsi/aacraid/sa.c 2.6.13-rc5-mm1-dev/drivers/scsi/aacraid/sa.c
--- 2.6.13-rc5-mm1/drivers/scsi/aacraid/sa.c 2005-08-07 10:05:21.000000000 -0700
+++ 2.6.13-rc5-mm1-dev/drivers/scsi/aacraid/sa.c 2005-08-10 14:21:35.000000000 -0700
@@ -189,8 +189,7 @@ static int sa_sync_cmd(struct aac_dev *d
ok = 1;
break;
}
- set_current_state(TASK_UNINTERRUPTIBLE);
- schedule_timeout(1);
+ schedule_timeout_uninterruptible(1);
}
if (ok != 1)
@@ -347,8 +346,7 @@ int aac_sa_init(struct aac_dev *dev)
name, instance, status);
goto error_iounmap;
}
- set_current_state(TASK_UNINTERRUPTIBLE);
- schedule_timeout(1);
+ schedule_timeout_uninterruptible(1);
}
if (request_irq(dev->scsi_host_ptr->irq, aac_sa_intr, SA_SHIRQ|SA_INTERRUPT, "aacraid", (void *)dev ) < 0) {
diff -urpN 2.6.13-rc5-mm1/drivers/scsi/dpt_i2o.c 2.6.13-rc5-mm1-dev/drivers/scsi/dpt_i2o.c
--- 2.6.13-rc5-mm1/drivers/scsi/dpt_i2o.c 2005-08-07 09:58:08.000000000 -0700
+++ 2.6.13-rc5-mm1-dev/drivers/scsi/dpt_i2o.c 2005-08-10 14:23:16.000000000 -0700
@@ -1211,8 +1211,7 @@ static s32 adpt_i2o_post_this(adpt_hba*
printk(KERN_WARNING"dpti%d: Timeout waiting for message frame!\n", pHba->unit);
return -ETIMEDOUT;
}
- set_current_state(TASK_UNINTERRUPTIBLE);
- schedule_timeout(1);
+ schedule_timeout_uninterruptible(1);
} while(m == EMPTY_QUEUE);
msg = pHba->msg_addr_virt + m;
@@ -1287,8 +1286,7 @@ static s32 adpt_i2o_reset_hba(adpt_hba*
printk(KERN_WARNING"Timeout waiting for message!\n");
return -ETIMEDOUT;
}
- set_current_state(TASK_UNINTERRUPTIBLE);
- schedule_timeout(1);
+ schedule_timeout_uninterruptible(1);
} while (m == EMPTY_QUEUE);
status = (u8*)kmalloc(4, GFP_KERNEL|ADDR32);
@@ -1320,8 +1318,7 @@ static s32 adpt_i2o_reset_hba(adpt_hba*
return -ETIMEDOUT;
}
rmb();
- set_current_state(TASK_UNINTERRUPTIBLE);
- schedule_timeout(1);
+ schedule_timeout_uninterruptible(1);
}
if(*status == 0x01 /*I2O_EXEC_IOP_RESET_IN_PROGRESS*/) {
@@ -1338,8 +1335,7 @@ static s32 adpt_i2o_reset_hba(adpt_hba*
printk(KERN_ERR "%s:Timeout waiting for IOP Reset.\n",pHba->name);
return -ETIMEDOUT;
}
- set_current_state(TASK_UNINTERRUPTIBLE);
- schedule_timeout(1);
+ schedule_timeout_uninterruptible(1);
} while (m == EMPTY_QUEUE);
// Flush the offset
adpt_send_nop(pHba, m);
@@ -1910,11 +1906,8 @@ static int adpt_ioctl(struct inode *inod
return -ENXIO;
}
- while((volatile u32) pHba->state & DPTI_STATE_RESET ) {
- set_task_state(current,TASK_UNINTERRUPTIBLE);
- schedule_timeout(2);
-
- }
+ while((volatile u32) pHba->state & DPTI_STATE_RESET )
+ schedule_timeout_uninterruptible(2);
switch (cmd) {
// TODO: handle 3 cases
@@ -2628,8 +2621,7 @@ static s32 adpt_send_nop(adpt_hba*pHba,u
printk(KERN_ERR "%s: Timeout waiting for message frame!\n",pHba->name);
return 2;
}
- set_current_state(TASK_UNINTERRUPTIBLE);
- schedule_timeout(1);
+ schedule_timeout_uninterruptible(1);
}
msg = (u32 __iomem *)(pHba->msg_addr_virt + m);
writel( THREE_WORD_MSG_SIZE | SGL_OFFSET_0,&msg[0]);
@@ -2663,8 +2655,7 @@ static s32 adpt_i2o_init_outbound_q(adpt
printk(KERN_WARNING"%s: Timeout waiting for message frame\n",pHba->name);
return -ETIMEDOUT;
}
- set_current_state(TASK_UNINTERRUPTIBLE);
- schedule_timeout(1);
+ schedule_timeout_uninterruptible(1);
} while(m == EMPTY_QUEUE);
msg=(u32 __iomem *)(pHba->msg_addr_virt+m);
@@ -2702,8 +2693,7 @@ static s32 adpt_i2o_init_outbound_q(adpt
printk(KERN_WARNING"%s: Timeout Initializing\n",pHba->name);
return -ETIMEDOUT;
}
- set_current_state(TASK_UNINTERRUPTIBLE);
- schedule_timeout(1);
+ schedule_timeout_uninterruptible(1);
} while (1);
// If the command was successful, fill the fifo with our reply
@@ -2781,8 +2771,7 @@ static s32 adpt_i2o_status_get(adpt_hba*
pHba->name);
return -ETIMEDOUT;
}
- set_current_state(TASK_UNINTERRUPTIBLE);
- schedule_timeout(1);
+ schedule_timeout_uninterruptible(1);
} while(m==EMPTY_QUEUE);
@@ -2809,8 +2798,7 @@ static s32 adpt_i2o_status_get(adpt_hba*
return -ETIMEDOUT;
}
rmb();
- set_current_state(TASK_UNINTERRUPTIBLE);
- schedule_timeout(1);
+ schedule_timeout_uninterruptible(1);
}
// Set up our number of outbound and inbound messages
diff -urpN 2.6.13-rc5-mm1/drivers/scsi/lpfc/lpfc_scsi.c 2.6.13-rc5-mm1-dev/drivers/scsi/lpfc/lpfc_scsi.c
--- 2.6.13-rc5-mm1/drivers/scsi/lpfc/lpfc_scsi.c 2005-08-07 09:58:09.000000000 -0700
+++ 2.6.13-rc5-mm1-dev/drivers/scsi/lpfc/lpfc_scsi.c 2005-08-12 13:51:18.000000000 -0700
@@ -883,8 +883,7 @@ __lpfc_abort_handler(struct scsi_cmnd *c
while (cmnd->host_scribble)
{
spin_unlock_irq(phba->host->host_lock);
- set_current_state(TASK_UNINTERRUPTIBLE);
- schedule_timeout(LPFC_ABORT_WAIT*HZ);
+ schedule_timeout_uninterruptible(LPFC_ABORT_WAIT*HZ);
spin_lock_irq(phba->host->host_lock);
if (++loop_count
> (2 * phba->cfg_nodev_tmo)/LPFC_ABORT_WAIT)
@@ -950,8 +949,7 @@ __lpfc_reset_lun_handler(struct scsi_cmn
if (pnode->nlp_state != NLP_STE_MAPPED_NODE) {
spin_unlock_irq(phba->host->host_lock);
- set_current_state(TASK_UNINTERRUPTIBLE);
- schedule_timeout( HZ/2);
+ schedule_timeout_uninterruptible(msecs_to_jiffies(500));
spin_lock_irq(phba->host->host_lock);
}
if ((pnode) && (pnode->nlp_state == NLP_STE_MAPPED_NODE))
@@ -1009,8 +1007,7 @@ __lpfc_reset_lun_handler(struct scsi_cmn
cmnd->device->id, cmnd->device->lun,
LPFC_CTX_LUN))) {
spin_unlock_irq(phba->host->host_lock);
- set_current_state(TASK_UNINTERRUPTIBLE);
- schedule_timeout(LPFC_RESET_WAIT*HZ);
+ schedule_timeout_uninterruptible(LPFC_RESET_WAIT*HZ);
spin_lock_irq(phba->host->host_lock);
if (++loopcnt
@@ -1108,8 +1105,7 @@ __lpfc_reset_bus_handler(struct scsi_cmn
&phba->sli.ring[phba->sli.fcp_ring],
0, 0, LPFC_CTX_HOST))) {
spin_unlock_irq(phba->host->host_lock);
- set_current_state(TASK_UNINTERRUPTIBLE);
- schedule_timeout(LPFC_RESET_WAIT*HZ);
+ schedule_timeout_uninterruptible(LPFC_RESET_WAIT*HZ);
spin_lock_irq(phba->host->host_lock);
if (++loopcnt
diff -urpN 2.6.13-rc5-mm1/drivers/scsi/NCR5380.c 2.6.13-rc5-mm1-dev/drivers/scsi/NCR5380.c
--- 2.6.13-rc5-mm1/drivers/scsi/NCR5380.c 2005-08-07 09:58:07.000000000 -0700
+++ 2.6.13-rc5-mm1-dev/drivers/scsi/NCR5380.c 2005-08-10 14:20:50.000000000 -0700
@@ -599,10 +599,7 @@ static int __init NCR5380_probe_irq(stru
NCR5380_write(INITIATOR_COMMAND_REG, ICR_BASE | ICR_ASSERT_DATA | ICR_ASSERT_SEL);
while (probe_irq == SCSI_IRQ_NONE && time_before(jiffies, timeout))
- {
- set_current_state(TASK_UNINTERRUPTIBLE);
- schedule_timeout(1);
- }
+ schedule_timeout_uninterruptible(1);
NCR5380_write(SELECT_ENABLE_REG, 0);
NCR5380_write(INITIATOR_COMMAND_REG, ICR_BASE);
diff -urpN 2.6.13-rc5-mm1/drivers/scsi/osst.c 2.6.13-rc5-mm1-dev/drivers/scsi/osst.c
--- 2.6.13-rc5-mm1/drivers/scsi/osst.c 2005-08-07 10:05:21.000000000 -0700
+++ 2.6.13-rc5-mm1-dev/drivers/scsi/osst.c 2005-08-12 13:42:13.000000000 -0700
@@ -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);
+ schedule_timeout_interruptible(HZ / 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);
+ schedule_timeout_interruptible(msecs_to_jiffies(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);
+ schedule_timeout_interruptible(msecs_to_jiffies(100));
}
printk(KERN_ERR "%s:E: Failed to find valid tape media\n", name);
#if DEBUG
diff -urpN 2.6.13-rc5-mm1/drivers/scsi/qla2xxx/qla_os.c 2.6.13-rc5-mm1-dev/drivers/scsi/qla2xxx/qla_os.c
--- 2.6.13-rc5-mm1/drivers/scsi/qla2xxx/qla_os.c 2005-08-07 09:58:14.000000000 -0700
+++ 2.6.13-rc5-mm1-dev/drivers/scsi/qla2xxx/qla_os.c 2005-08-12 13:42:28.000000000 -0700
@@ -1944,10 +1944,8 @@ qla2x00_mem_free(scsi_qla_host_t *ha)
/* Make sure all other threads are stopped. */
wtime = 60 * HZ;
- while (ha->dpc_wait && wtime) {
- set_current_state(TASK_INTERRUPTIBLE);
- wtime = schedule_timeout(wtime);
- }
+ while (ha->dpc_wait && wtime)
+ wtime = schedule_timeout_interruptible(wtime);
/* free ioctl memory */
qla2x00_free_ioctl_mem(ha);
@@ -2478,13 +2476,12 @@ qla2x00_timer(scsi_qla_host_t *ha)
int
qla2x00_down_timeout(struct semaphore *sema, unsigned long timeout)
{
- const unsigned int step = HZ/10;
+ const unsigned int step = msecs_to_jiffies(100);
do {
if (!down_trylock(sema))
return 0;
- set_current_state(TASK_INTERRUPTIBLE);
- if (schedule_timeout(step))
+ if (schedule_timeout_interruptible(step))
break;
} while ((timeout -= step) > 0);
^ permalink raw reply [flat|nested] 30+ messages in thread
* [-mm PATCH 30/32] serial: fix-up schedule_timeout() usage
2005-08-15 18:05 [-mm PATCH 0/32] fix-up schedule_timeout() usage Nishanth Aravamudan
` (15 preceding siblings ...)
2005-08-15 18:27 ` [-mm PATCH 29/32] drivers/scsi: " Nishanth Aravamudan
@ 2005-08-15 18:28 ` Nishanth Aravamudan
2005-08-15 18:29 ` [-mm PATCH 31/32] telephony: " Nishanth Aravamudan
17 siblings, 0 replies; 30+ messages in thread
From: Nishanth Aravamudan @ 2005-08-15 18:28 UTC (permalink / raw)
To: starvik, rmk+serial; +Cc: akpm, dev-etrax, linux-serial
Description: Use schedule_timeout_uninterruptible() instead of
set_current_state()/schedule_timeout() to reduce kernel size.
Signed-off-by: Nishanth Aravamudan <nacc@us.ibm.com>
---
drivers/serial/crisv10.c | 9 +++------
1 files changed, 3 insertions(+), 6 deletions(-)
diff -urpN 2.6.13-rc5-mm1/drivers/serial/crisv10.c 2.6.13-rc5-mm1-dev/drivers/serial/crisv10.c
--- 2.6.13-rc5-mm1/drivers/serial/crisv10.c 2005-08-07 09:58:14.000000000 -0700
+++ 2.6.13-rc5-mm1-dev/drivers/serial/crisv10.c 2005-08-10 14:27:46.000000000 -0700
@@ -4417,10 +4417,8 @@ rs_close(struct tty_struct *tty, struct
info->event = 0;
info->tty = 0;
if (info->blocked_open) {
- if (info->close_delay) {
- set_current_state(TASK_INTERRUPTIBLE);
- schedule_timeout(info->close_delay);
- }
+ if (info->close_delay)
+ schedule_timeout_interruptible(info->close_delay);
wake_up_interruptible(&info->open_wait);
}
info->flags &= ~(ASYNC_NORMAL_ACTIVE|ASYNC_CLOSING);
@@ -4470,8 +4468,7 @@ static void rs_wait_until_sent(struct tt
while (info->xmit.head != info->xmit.tail || /* More in send queue */
(*info->ostatusadr & 0x007f) || /* more in FIFO */
(elapsed_usec < 2*info->char_time_usec)) {
- set_current_state(TASK_INTERRUPTIBLE);
- schedule_timeout(1);
+ schedule_timeout_interruptible(1);
if (signal_pending(current))
break;
if (timeout && time_after(jiffies, orig_jiffies + timeout))
^ permalink raw reply [flat|nested] 30+ messages in thread
* [-mm PATCH 31/32] telephony: fix-up schedule_timeout() usage
2005-08-15 18:05 [-mm PATCH 0/32] fix-up schedule_timeout() usage Nishanth Aravamudan
` (16 preceding siblings ...)
2005-08-15 18:28 ` [-mm PATCH 30/32] serial: " Nishanth Aravamudan
@ 2005-08-15 18:29 ` Nishanth Aravamudan
17 siblings, 0 replies; 30+ messages in thread
From: Nishanth Aravamudan @ 2005-08-15 18:29 UTC (permalink / raw)
To: eokerson; +Cc: akpm, linux-kernel
Description: Use schedule_timeout_uninterruptible() instead of
set_current_state()/schedule_timeout() to reduce kernel size.
Signed-off-by: Nishanth Aravamudan <nacc@us.ibm.com>
---
drivers/telephony/ixj.c | 54 ++++++++++++++++--------------------------------
1 files changed, 18 insertions(+), 36 deletions(-)
diff -urpN 2.6.13-rc5-mm1/drivers/telephony/ixj.c 2.6.13-rc5-mm1-dev/drivers/telephony/ixj.c
--- 2.6.13-rc5-mm1/drivers/telephony/ixj.c 2005-08-07 10:05:21.000000000 -0700
+++ 2.6.13-rc5-mm1-dev/drivers/telephony/ixj.c 2005-08-10 14:29:41.000000000 -0700
@@ -2071,8 +2071,7 @@ static int ixj_ring(IXJ *j)
j->flags.ringing = 0;
return 1;
}
- set_current_state(TASK_INTERRUPTIBLE);
- schedule_timeout(1);
+ schedule_timeout_interruptible(1);
if (signal_pending(current))
break;
}
@@ -2086,8 +2085,7 @@ static int ixj_ring(IXJ *j)
return 1;
}
}
- set_current_state(TASK_INTERRUPTIBLE);
- schedule_timeout(1);
+ schedule_timeout_interruptible(1);
if (signal_pending(current))
break;
}
@@ -2153,10 +2151,8 @@ static int ixj_release(struct inode *ino
* Set up locks to ensure that only one process is talking to the DSP at a time.
* This is necessary to keep the DSP from locking up.
*/
- while(test_and_set_bit(board, (void *)&j->busyflags) != 0) {
- set_current_state(TASK_INTERRUPTIBLE);
- schedule_timeout(1);
- }
+ while(test_and_set_bit(board, (void *)&j->busyflags) != 0)
+ schedule_timeout_interruptible(1);
if (ixjdebug & 0x0002)
printk(KERN_INFO "Closing board %d\n", NUM(inode));
@@ -3286,14 +3282,10 @@ static void ixj_write_cidcw(IXJ *j)
ixj_play_tone(j, 23);
clear_bit(j->board, &j->busyflags);
- while(j->tone_state) {
- set_current_state(TASK_INTERRUPTIBLE);
- schedule_timeout(1);
- }
- while(test_and_set_bit(j->board, (void *)&j->busyflags) != 0) {
- set_current_state(TASK_INTERRUPTIBLE);
- schedule_timeout(1);
- }
+ while(j->tone_state)
+ schedule_timeout_interruptible(1);
+ while(test_and_set_bit(j->board, (void *)&j->busyflags) != 0)
+ schedule_timeout_interruptible(1);
if(ixjdebug & 0x0200) {
printk("IXJ cidcw phone%d first tone end at %ld\n", j->board, jiffies);
}
@@ -3313,14 +3305,10 @@ static void ixj_write_cidcw(IXJ *j)
ixj_play_tone(j, 24);
clear_bit(j->board, &j->busyflags);
- while(j->tone_state) {
- set_current_state(TASK_INTERRUPTIBLE);
- schedule_timeout(1);
- }
- while(test_and_set_bit(j->board, (void *)&j->busyflags) != 0) {
- set_current_state(TASK_INTERRUPTIBLE);
- schedule_timeout(1);
- }
+ while(j->tone_state)
+ schedule_timeout_interruptible(1);
+ while(test_and_set_bit(j->board, (void *)&j->busyflags) != 0)
+ schedule_timeout_interruptible(1);
if(ixjdebug & 0x0200) {
printk("IXJ cidcw phone%d sent second tone at %ld\n", j->board, jiffies);
}
@@ -3328,14 +3316,10 @@ static void ixj_write_cidcw(IXJ *j)
j->cidcw_wait = jiffies + ((50 * hertz) / 100);
clear_bit(j->board, &j->busyflags);
- while(!j->flags.cidcw_ack && time_before(jiffies, j->cidcw_wait)) {
- set_current_state(TASK_INTERRUPTIBLE);
- schedule_timeout(1);
- }
- while(test_and_set_bit(j->board, (void *)&j->busyflags) != 0) {
- set_current_state(TASK_INTERRUPTIBLE);
- schedule_timeout(1);
- }
+ while(!j->flags.cidcw_ack && time_before(jiffies, j->cidcw_wait))
+ schedule_timeout_interruptible(1);
+ while(test_and_set_bit(j->board, (void *)&j->busyflags) != 0)
+ schedule_timeout_interruptible(1);
j->cidcw_wait = 0;
if(!j->flags.cidcw_ack) {
if(ixjdebug & 0x0200) {
@@ -6110,10 +6094,8 @@ static int ixj_ioctl(struct inode *inode
* Set up locks to ensure that only one process is talking to the DSP at a time.
* This is necessary to keep the DSP from locking up.
*/
- while(test_and_set_bit(board, (void *)&j->busyflags) != 0) {
- set_current_state(TASK_INTERRUPTIBLE);
- schedule_timeout(1);
- }
+ while(test_and_set_bit(board, (void *)&j->busyflags) != 0)
+ schedule_timeout_interruptible(1);
if (ixjdebug & 0x0040)
printk("phone%d ioctl, cmd: 0x%x, arg: 0x%lx\n", minor, cmd, arg);
if (minor >= IXJMAX) {
^ permalink raw reply [flat|nested] 30+ messages in thread
* Re: [-mm PATCH 2/32] fs: fix-up schedule_timeout() usage
2005-08-15 18:08 ` [-mm PATCH 2/32] fs: fix-up schedule_timeout() usage Nishanth Aravamudan
2005-08-15 18:17 ` [xfs-masters] " Christoph Hellwig
@ 2005-08-15 18:37 ` Stephen C. Tweedie
2005-08-15 20:23 ` Steven French
2 siblings, 0 replies; 30+ messages in thread
From: Stephen C. Tweedie @ 2005-08-15 18:37 UTC (permalink / raw)
To: Nishanth Aravamudan
Cc: sfrench, okir, Trond Myklebust, reiserfs-dev, urban, xfs-masters,
Nathan Scott, Andrew Morton, samba-technical, linux-kernel,
reiserfs-list, samba, linux-xfs, Stephen Tweedie
Hi,
On Mon, 2005-08-15 at 19:08, Nishanth Aravamudan wrote:
> Description: Use schedule_timeout_{,un}interruptible() instead of
> set_current_state()/schedule_timeout() to reduce kernel size.
> +++ 2.6.13-rc5-mm1-dev/fs/jbd/transaction.c 2005-08-10 15:03:33.000000000 -0700
> @@ -1340,8 +1340,7 @@ int journal_stop(handle_t *handle)
> - set_current_state(TASK_UNINTERRUPTIBLE);
> - schedule_timeout(1);
> + schedule_timeout_uninterruptible(1);
This chunk at least is fine.
--Stephen
^ permalink raw reply [flat|nested] 30+ messages in thread
* Re: [xfs-masters] [-mm PATCH 2/32] fs: fix-up schedule_timeout() usage
2005-08-15 18:17 ` [xfs-masters] " Christoph Hellwig
@ 2005-08-15 18:40 ` Nishanth Aravamudan
2005-08-15 20:36 ` Christoph Hellwig
0 siblings, 1 reply; 30+ messages in thread
From: Nishanth Aravamudan @ 2005-08-15 18:40 UTC (permalink / raw)
To: Christoph Hellwig
Cc: xfs-masters, sfrench, sct, okir, trond.myklebust, reiserfs-dev,
urban, nathans, akpm, samba-technical, linux-kernel,
reiserfs-list, samba, linux-xfs
On 15.08.2005 [20:17:52 +0200], Christoph Hellwig wrote:
> On Mon, Aug 15, 2005 at 11:08:04AM -0700, Nishanth Aravamudan wrote:
> > Description: Use schedule_timeout_{,un}interruptible() instead of
> > set_current_state()/schedule_timeout() to reduce kernel size. Also use
> > helper functions to convert between human time units and jiffies rather
> > than constant HZ division to avoid rounding errors.
>
> The XFS changes are still wrong for the same rason as last time,
> we actually do want the daemons to do work if they're woken earlier
> using wake_up_process.
Hrm, I got dropped from the Cc list...? No worries, I'm subscribed in
two places :)
I think your reference to "last time" is the KJ patches which probably
used msleep{,_interruptible}() instead of schedule_timeout(). This
patchset, in contrast, should result in *no* functional changes (beyond
some more precisie conversions, where appropriate).
schedule_timeout_interruptible(some_value), for instance is nothing more than:
set_current_state(TASK_INTERRUPTIBLE);
schedule_timeout(some_value);
Just in the form of a combine function call. No loops like msleep() &
co.
Is the patch still a problem?
Thanks,
Nish
^ permalink raw reply [flat|nested] 30+ messages in thread
* Re: [uml-devel] [-mm PATCH 14/32] um: fix-up schedule_timeout() usage
2005-08-15 18:16 ` [uml-devel] [-mm PATCH 14/32] um: " Nishanth Aravamudan
@ 2005-08-15 18:54 ` Jeff Dike
0 siblings, 0 replies; 30+ messages in thread
From: Jeff Dike @ 2005-08-15 18:54 UTC (permalink / raw)
To: Nishanth Aravamudan; +Cc: akpm, user-mode-linux-devel
On Mon, Aug 15, 2005 at 11:16:26AM -0700, Nishanth Aravamudan wrote:
> Description: Use schedule_timeout_interruptible() instead of
> set_current_state()/schedule_timeout() to reduce kernel size.
>
> Signed-off-by: Nishanth Aravamudan <nacc@us.ibm.com>
Acked-by: Jeff Dike <jdike@addtoit.com>
-------------------------------------------------------
SF.Net email is Sponsored by the Better Software Conference & EXPO
September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices
Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA
Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf
_______________________________________________
User-mode-linux-devel mailing list
User-mode-linux-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel
^ permalink raw reply [flat|nested] 30+ messages in thread
* Re: [-mm PATCH 2/32] fs: fix-up schedule_timeout() usage
2005-08-15 18:08 ` [-mm PATCH 2/32] fs: fix-up schedule_timeout() usage Nishanth Aravamudan
2005-08-15 18:17 ` [xfs-masters] " Christoph Hellwig
2005-08-15 18:37 ` Stephen C. Tweedie
@ 2005-08-15 20:23 ` Steven French
2 siblings, 0 replies; 30+ messages in thread
From: Steven French @ 2005-08-15 20:23 UTC (permalink / raw)
To: nacc
Cc: akpm, linux-kernel, linux-xfs, nathans, okir, reiserfs-dev,
reiserfs-list, samba, samba-technical, sct, sfrench,
trond.myklebust, urban, xfs-masters
[-- Attachment #1: Type: text/plain, Size: 175 bytes --]
The cifs ones look fine with me.
Steve French
Senior Software Engineer
Linux Technology Center - IBM Austin
phone: 512-838-2294
email: sfrench at-sign us dot ibm dot com
[-- Attachment #2: Type: text/html, Size: 229 bytes --]
^ permalink raw reply [flat|nested] 30+ messages in thread
* Re: [-mm PATCH 29/32] drivers/scsi: fix-up schedule_timeout() usage
2005-08-15 18:27 ` [-mm PATCH 29/32] drivers/scsi: " Nishanth Aravamudan
@ 2005-08-15 20:34 ` Willem Riede
2005-08-15 20:42 ` Nishanth Aravamudan
0 siblings, 1 reply; 30+ messages in thread
From: Willem Riede @ 2005-08-15 20:34 UTC (permalink / raw)
To: Nishanth Aravamudan
Cc: James.Bottomley, matthew, markus.lidel, andrew.vasquez, akpm,
linux-scsi
On 08/15/2005 02:27:51 PM, Nishanth Aravamudan wrote:
> Description: Use schedule_timeout_uninterruptible() instead of
> set_current_state()/schedule_timeout() to reduce kernel size.
>
> Signed-off-by: Nishanth Aravamudan <nacc@us.ibm.com>
>
> ---
>
> drivers/scsi/osst.c | 9 +++------
>
> diff -urpN 2.6.13-rc5-mm1/drivers/scsi/osst.c
> 2.6.13-rc5-mm1-dev/drivers/scsi/osst.c
> --- 2.6.13-rc5-mm1/drivers/scsi/osst.c 2005-08-07 10:05:21.000000000
> -0700
> +++ 2.6.13-rc5-mm1-dev/drivers/scsi/osst.c 2005-08-12
> 13:42:13.000000000 -0700
> @@ -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);
> + schedule_timeout_interruptible(HZ /
OSST_POLL_PER_SEC);
Others have suggested using msleep in osst instead of schedule, which I think
is
more appropriate.
Regards, Willem Riede.
^ permalink raw reply [flat|nested] 30+ messages in thread
* Re: [xfs-masters] [-mm PATCH 2/32] fs: fix-up schedule_timeout() usage
2005-08-15 18:40 ` Nishanth Aravamudan
@ 2005-08-15 20:36 ` Christoph Hellwig
0 siblings, 0 replies; 30+ messages in thread
From: Christoph Hellwig @ 2005-08-15 20:36 UTC (permalink / raw)
To: Nishanth Aravamudan
Cc: Christoph Hellwig, xfs-masters, sfrench, sct, okir,
trond.myklebust, reiserfs-dev, urban, nathans, akpm,
samba-technical, linux-kernel, reiserfs-list, samba, linux-xfs
On Mon, Aug 15, 2005 at 11:40:13AM -0700, Nishanth Aravamudan wrote:
> Hrm, I got dropped from the Cc list...? No worries, I'm subscribed in
> two places :)
I didn't do that manually, must haven some mail header thing.
> I think your reference to "last time" is the KJ patches which probably
> used msleep{,_interruptible}() instead of schedule_timeout(). This
> patchset, in contrast, should result in *no* functional changes (beyond
> some more precisie conversions, where appropriate).
> schedule_timeout_interruptible(some_value), for instance is nothing more than:
>
> set_current_state(TASK_INTERRUPTIBLE);
> schedule_timeout(some_value);
>
> Just in the form of a combine function call. No loops like msleep() &
> co.
>
> Is the patch still a problem?
No, it's fine. Sorry for the noise.
^ permalink raw reply [flat|nested] 30+ messages in thread
* Re: [-mm PATCH 29/32] drivers/scsi: fix-up schedule_timeout() usage
2005-08-15 20:34 ` Willem Riede
@ 2005-08-15 20:42 ` Nishanth Aravamudan
0 siblings, 0 replies; 30+ messages in thread
From: Nishanth Aravamudan @ 2005-08-15 20:42 UTC (permalink / raw)
To: Willem Riede
Cc: James.Bottomley, matthew, markus.lidel, andrew.vasquez, akpm,
linux-scsi
On 15.08.2005 [20:34:27 +0000], Willem Riede wrote:
> On 08/15/2005 02:27:51 PM, Nishanth Aravamudan wrote:
> > Description: Use schedule_timeout_uninterruptible() instead of
> > set_current_state()/schedule_timeout() to reduce kernel size.
> >
> > Signed-off-by: Nishanth Aravamudan <nacc@us.ibm.com>
> >
> > ---
> >
> > drivers/scsi/osst.c | 9 +++------
> >
> > diff -urpN 2.6.13-rc5-mm1/drivers/scsi/osst.c
> > 2.6.13-rc5-mm1-dev/drivers/scsi/osst.c
> > --- 2.6.13-rc5-mm1/drivers/scsi/osst.c 2005-08-07 10:05:21.000000000
> > -0700
> > +++ 2.6.13-rc5-mm1-dev/drivers/scsi/osst.c 2005-08-12
> > 13:42:13.000000000 -0700
> > @@ -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);
> > + schedule_timeout_interruptible(HZ /
> OSST_POLL_PER_SEC);
>
> Others have suggested using msleep in osst instead of schedule, which I think
> is
> more appropriate.
That's my fault, you are right, a patch for msleep() usage in OSST
already exists in the latest -KJ patchset and covers all these changes.
I tried to avoid collisions between existing changes in -KJ and these
new ones in -MM, but must have missed this one.
Thanks,
Nish
^ permalink raw reply [flat|nested] 30+ messages in thread
* Re: [-mm PATCH 1/32] include: update jiffies/{m,u}secs conversion functions
2005-08-15 18:06 ` [-mm PATCH 1/32] include: update jiffies/{m,u}secs conversion functions Nishanth Aravamudan
@ 2005-08-17 23:35 ` Andrew Morton
2005-08-18 3:19 ` Nishanth Aravamudan
0 siblings, 1 reply; 30+ messages in thread
From: Andrew Morton @ 2005-08-17 23:35 UTC (permalink / raw)
To: Nishanth Aravamudan; +Cc: linux-kernel
Nishanth Aravamudan <nacc@us.ibm.com> wrote:
>
> Description: Clarify the human-time units to jiffies conversion
> functions by using the constants in time.h. This makes many of the
> subsequent patches direct copies of the current code.
>
>
> /* Parameters used to convert the timespec values */
> +#ifndef MSEC_PER_SEC
> +#define MSEC_PER_SEC (1000L)
> +#endif
> +
> #ifndef USEC_PER_SEC
> #define USEC_PER_SEC (1000000L)
> #endif
Bah. There's no MSEC_PER_SEC defined anywhere in the tree, so the ifndef
isn't needed. Nor is the one for USEC_PER_SEC, come to that. I'll kill
them.
^ permalink raw reply [flat|nested] 30+ messages in thread
* Re: [-mm PATCH 1/32] include: update jiffies/{m,u}secs conversion functions
2005-08-17 23:35 ` Andrew Morton
@ 2005-08-18 3:19 ` Nishanth Aravamudan
0 siblings, 0 replies; 30+ messages in thread
From: Nishanth Aravamudan @ 2005-08-18 3:19 UTC (permalink / raw)
To: Andrew Morton; +Cc: linux-kernel
On 17.08.2005 [16:35:06 -0700], Andrew Morton wrote:
> Nishanth Aravamudan <nacc@us.ibm.com> wrote:
> >
> > Description: Clarify the human-time units to jiffies conversion
> > functions by using the constants in time.h. This makes many of the
> > subsequent patches direct copies of the current code.
> >
> >
> > /* Parameters used to convert the timespec values */
> > +#ifndef MSEC_PER_SEC
> > +#define MSEC_PER_SEC (1000L)
> > +#endif
> > +
> > #ifndef USEC_PER_SEC
> > #define USEC_PER_SEC (1000000L)
> > #endif
>
> Bah. There's no MSEC_PER_SEC defined anywhere in the tree, so the ifndef
> isn't needed. Nor is the one for USEC_PER_SEC, come to that. I'll kill
> them.
Yup, that's fine by me. Thanks!
-Nish
^ permalink raw reply [flat|nested] 30+ messages in thread
end of thread, other threads:[~2005-08-18 3:19 UTC | newest]
Thread overview: 30+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-08-15 18:05 [-mm PATCH 0/32] fix-up schedule_timeout() usage Nishanth Aravamudan
2005-08-15 18:06 ` [-mm PATCH 1/32] include: update jiffies/{m,u}secs conversion functions Nishanth Aravamudan
2005-08-17 23:35 ` Andrew Morton
2005-08-18 3:19 ` Nishanth Aravamudan
2005-08-15 18:08 ` [-mm PATCH 2/32] fs: fix-up schedule_timeout() usage Nishanth Aravamudan
2005-08-15 18:17 ` [xfs-masters] " Christoph Hellwig
2005-08-15 18:40 ` Nishanth Aravamudan
2005-08-15 20:36 ` Christoph Hellwig
2005-08-15 18:37 ` Stephen C. Tweedie
2005-08-15 20:23 ` Steven French
2005-08-15 18:08 ` [-mm PATCH 3/32] kernel: " Nishanth Aravamudan
2005-08-15 18:09 ` [-mm PATCH 4/32] mm: " Nishanth Aravamudan
2005-08-15 18:10 ` [-mm PATCH 06/32] sound: " Nishanth Aravamudan
2005-08-15 18:14 ` [-mm PATCH 11/32] mips: " Nishanth Aravamudan
2005-08-15 18:15 ` [-mm PATCH 12/32] ppc: " Nishanth Aravamudan
2005-08-15 18:16 ` [uml-devel] [-mm PATCH 14/32] um: " Nishanth Aravamudan
2005-08-15 18:54 ` Jeff Dike
[not found] ` <20050815180514.GC2854-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org>
2005-08-15 18:10 ` [-mm PATCH 05/32] net: " Nishanth Aravamudan
2005-08-15 18:16 ` [-mm PATCH 15/32] drivers/acpi: " Nishanth Aravamudan
2005-08-15 18:18 ` [-mm PATCH 17/32] drivers/cdrom: " Nishanth Aravamudan
2005-08-15 18:19 ` [-mm PATCH 19/32] drivers/dlm: " Nishanth Aravamudan
2005-08-15 18:23 ` [-mm PATCH 23/32] drivers/macintosh: " Nishanth Aravamudan
2005-08-15 18:24 ` [-mm PATCH 24/32] drivers/md: " Nishanth Aravamudan
2005-08-15 18:25 ` [-mm PATCH 26/32] message: " Nishanth Aravamudan
2005-08-15 18:26 ` [-mm PATCH 28/32] drivers/sbus: " Nishanth Aravamudan
2005-08-15 18:27 ` [-mm PATCH 29/32] drivers/scsi: " Nishanth Aravamudan
2005-08-15 20:34 ` Willem Riede
2005-08-15 20:42 ` Nishanth Aravamudan
2005-08-15 18:28 ` [-mm PATCH 30/32] serial: " Nishanth Aravamudan
2005-08-15 18:29 ` [-mm PATCH 31/32] telephony: " 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.