Re: VFS?VM - mmap/write deadlock

Ingo Molnar (mingo@chiara.csoma.elte.hu)
Fri, 17 Dec 1999 18:14:13 +0100 (CET)


On Fri, 17 Dec 1999, Eleonora Autore wrote:

> I remember very vaguely Alexander Viro mentioning some easily
> reproducible deadlock when doing mmap followed by write in some
> specific sequence (or a page cache in some specific state?).
>
> Can you please remind me of the scenario - weekend is at hand and one
> needs to do something about it.

actually it was originally noticed by David Miller and mentioned by me :)
The deadlock scenario is when you:

ptr = mmap(file, 4096, 0)
write (file, ptr, 4096);

the write() generates a pagefault which deadlocks on the page lock. (the
process gets 'stuck'.)

the goal is to fix this completely pointless situation in a way that does
not slow down normal usage.

-- mingo

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/