[prev in list] [next in list] [prev in thread] [next in thread]
List: linux-kernel
Subject: Re: beware of add_waitqueue/waitqueue_active
From: Andrea Arcangeli <andrea () suse ! de>
Date: 2000-11-30 21:27:25
[Download RAW message or body]
On Thu, Nov 30, 2000 at 07:02:56PM +0530, V Ganesh wrote:
> 3. add_wait_queue adds this process to the waitqueue. but all the writes
> are in write-buffers and have not gone down to cache/memory yet.
> 4. PageLocked() finds that the page is locked.
Right.
> [..] speculative execution
> of PageLocked() even before add_wait_queue returns [..]
Right.
Both could happen because of the new spin_unlock implementation that doesn't
take anymore the lock on the bus:
#define spin_unlock_string \
"movb $1,%0"
With the previous `lock ; btrl' 4) couldn't happen with pending
writes on the write buffer because spin_unlock was a full barrier too...
Alpha was safe because it has to imply an mb() in spin_unlock (but
sparc64 was hurted too for example).
As you say the problematic construct is not used anymore into 2.4.0-test12-pre2
in filemap.c so such deadlock can't happen anymore but it's been useful that
you pointing out the problem, thanks.
Andrea
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
Please read the FAQ at http://www.tux.org/lkml/
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic