Messages in this thread |  | | Date | Thu, 30 Nov 2000 22:27:25 +0100 | From | Andrea Arcangeli <> | Subject | Re: beware of add_waitqueue/waitqueue_active |
| |
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/
|  |