[lkml]   [2000]   [Sep]   [25]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
Patch in this message
SubjectRe: [patch] vmfixes-2.4.0-test9-B2
On Mon, Sep 25, 2000 at 03:10:51PM +0200, Ingo Molnar wrote:
> yep. But i dont understand why this makes any difference - the waitqueue

It makes a difference because your sleeping reads won't get the wakeup
even while they could queue their reserved read request (they have
to wait the FIFO to roll or some write to complete).

> wakeup is FIFO, so any other request will eventually arrive. Could you
> explain this bug a bit better?

Well it may not explain an infinite hang because as you say the write that got
the suprious wakeup will unplug the queue and after some time the reads will be
wakenup. So maybe that wasn't the reason of your hangs because I remeber your
problem looked more like an infinite hang that was only solved by kflushd
writing some more stuff and unplugging the queue as side effect (however I'm
not sure since I never experienced those myself).

But I hope if it wasn't that one it's the below fix that will help:

Index: mm/filemap.c
RCS file: /home/andrea/cvs/linux/mm/filemap.c,v
retrieving revision
retrieving revision
diff -u -r1. -r1.
--- mm/filemap.c 2000/09/21 03:11:53
+++ mm/filemap.c 2000/09/25 03:33:31
@@ -622,8 +622,8 @@

add_wait_queue(&page->wait, &wait);
do {
- sync_page(page);
set_task_state(tsk, TASK_UNINTERRUPTIBLE);
+ sync_page(page);
if (!PageLocked(page))
Index: fs/buffer.c
RCS file: /home/andrea/cvs/linux/fs/buffer.c,v
retrieving revision
retrieving revision
diff -u -r1. -r1.
--- fs/buffer.c 2000/09/06 19:57:51
+++ fs/buffer.c 2000/09/25 03:33:30
@@ -147,8 +147,8 @@
add_wait_queue(&bh->b_wait, &wait);
do {
- run_task_queue(&tq_disk);
set_task_state(tsk, TASK_UNINTERRUPTIBLE);
+ run_task_queue(&tq_disk);
if (!buffer_locked(bh))

Think if the buffer returns locked between set_task_state(tsk,
TASK_UNINTERRUPTIBLE) and if (!buffer_locked(bh)). The window is very small but
it looks a genuine window for a deadlock. (and this one could sure explain
infinite hangs in read... even if it looks even less realistic than the
EXCLUSIVE task thing)
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
Please read the FAQ at

 \ /
  Last update: 2005-03-22 12:38    [W:0.234 / U:1.588 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site