[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [patch] take 2 Re: PG_swap_entry bug in recent kernels
Hi,
On Sat, Apr 08, 2000 at 02:47:29PM -0700, Kanoj Sarcar wrote:
>
> You have answered your own question in a later email. I quote you:
> "Are you using read_swap_cache from any
> swapin event? The problem is swapin can't use read_swap_cache because with
> read_swap_cache we would never know if we're doing I/O on an inactive swap
> entry"
Right. The way the swap synchronisation always worked was that
we must have a swap cache entry before _any_ IO, so the page lock
bit on that swap cache page could also serve as an IO lock on the
swap entry. (Actually, it didn't _always_ work that way, but that's
the basic mechanism with the current swap cache.)
That relied on the swapper being able to do an atomic operation to
search for a page cache page, and to create a new page and lock it
if it wasn't already there. That was made atomic only by use of the
big lock. If you don't have all page cache activity using that lock,
then yes, you'll need the page cache lock while you set all of this
up.
--Stephen
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux.eu.org/Linux-MM/