[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] swapin readahead



Hi,

On Tue, 1 Dec 1998 19:32:52 +0100 (CET), Rik van Riel
<H.H.vanRiel@phys.uu.nl> said:

> I took the bet that shrink_mmap() would take care of that, but
> aperrantly not always :(

shrink_mmap() only gets rid of otherwise unused pages (pages whose count
is one).  After read_swap_cache_async(), the page count will be three:
once for the swap cache, once for the io in progress, once for the
reference returned by read_swap_cache_async().  You need to free that
last reference explicitly after doing the readahead call.  The io
reference will be returned once IO completes, and shrink_mmap() will
take care of the final swap cache reference.

--Stephen
--
This is a majordomo managed list.  To unsubscribe, send a message with
the body 'unsubscribe linux-mm me@address' to: majordomo@kvack.org