[PATCH] 2.1.88 Hanging Processes (Uninterruptible Sleep)

F Harvell (fharvell@fts.net)
Mon, 02 Mar 1998 16:38:45 -0500


This is a multipart MIME message.

--==_Exmh_21334323200
Content-Type: text/plain; charset=us-ascii

Based on personal observations and from reading the kernel/smp
lists, the uninterruptible sleep problems appear to be SMP related. It
is aggravated by the IO-APIC code (which makes a significantly faster
system) implemented in 2.1.85+. I have added the __asm__ line to the
four places in kernel 2.1.88 where there is a schedule loop around an
uninterruptible sleep. This appears to have significantly helped
reduce my problems with processes getting stuck in the uninterruptible
sleep mode. The patch is included below. Hope this helps.

--==_Exmh_21334323200
Content-Type: text/plain; name="io_wait_2.1.88.patch"
Content-Description: io_wait_2.1.88.patch
Content-Transfer-Encoding: quoted-printable
Content-Disposition: attachment; filename="p"

diff -r -c linux-2.1.88.orig/fs/buffer.c linux/fs/buffer.c
*** linux-2.1.88.orig/fs/buffer.c Thu Feb 19 04:09:47 1998
--- linux/fs/buffer.c Sat Feb 28 01:00:52 1998
***************
*** 138,143 ****
--- 138,144 ----
add_wait_queue(&bh->b_wait, &wait);
repeat:
tsk->state =3D TASK_UNINTERRUPTIBLE;
+ __asm__ __volatile__("cpuid": : :"ax", "bx", "cx", "dx", "memory");
run_task_queue(&tq_disk);
if (buffer_locked(bh)) {
schedule();
diff -r -c linux-2.1.88.orig/fs/dquot.c linux/fs/dquot.c
*** linux-2.1.88.orig/fs/dquot.c Mon Jan 12 17:46:24 1998
--- linux/fs/dquot.c Sun Mar 1 08:33:37 1998
***************
*** 173,178 ****
--- 173,179 ----
add_wait_queue(&dquot->dq_wait, &wait);
repeat:
current->state =3D TASK_UNINTERRUPTIBLE;
+ __asm__ __volatile__("cpuid": : :"ax", "bx", "cx", "dx", "memory");
if (dquot->dq_flags & DQ_LOCKED) {
dquot->dq_flags |=3D DQ_WANT;
schedule();
diff -r -c linux-2.1.88.orig/fs/inode.c linux/fs/inode.c
*** linux-2.1.88.orig/fs/inode.c Mon Feb 9 14:34:17 1998
--- linux/fs/inode.c Sat Feb 28 01:03:06 1998
***************
*** 103,108 ****
--- 103,109 ----
add_wait_queue(&inode->i_wait, &wait);
repeat:
current->state =3D TASK_UNINTERRUPTIBLE;
+ __asm__ __volatile__("cpuid": : :"ax", "bx", "cx", "dx", "memory");
if (inode->i_state & I_LOCK) {
schedule();
goto repeat;
diff -r -c linux-2.1.88.orig/fs/super.c linux/fs/super.c
*** linux-2.1.88.orig/fs/super.c Fri Jan 30 19:43:11 1998
--- linux/fs/super.c Sun Mar 1 08:34:08 1998
***************
*** 422,427 ****
--- 422,428 ----
add_wait_queue(&sb->s_wait, &wait);
repeat:
current->state =3D TASK_UNINTERRUPTIBLE;
+ __asm__ __volatile__("cpuid": : :"ax", "bx", "cx", "dx", "memory");
if (sb->s_lock) {
schedule();
goto repeat;

--==_Exmh_21334323200
Content-Type: text/plain; charset=us-ascii

Mr. F Harvell Phone:407 696-4340
FTS International, Systems Division Phone:407 399-0342 (cell)
3498 Buffam Place Fax:407 696-4244
Casselberry, FL 32707 mailto:fharvell@fts.net

--==_Exmh_21334323200--

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu