[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: swapin readahead and locking
Hi,
On Tue, 1 Dec 1998 17:12:45 +0100 (CET), Rik van Riel
<H.H.vanRiel@phys.uu.nl> said:
> struct page *page_map = lookup_swap_cache(entry);
> if (!page_map) {
> page_map = read_swap_cache(entry);
> ... do readahead stuff
> }
read_swap_cache() is not asynchronous! include/linux/swap.h:
#define read_swap_cache(entry) read_swap_cache_async(entry, 1);
I think you were on the right lines before (except for the missing
free_page()).
> I have a funny feeling I missed a wait_on_page() this way,
> but things are runnig happily right now.
No, read_swap_cache automatically waits, and if you do the async
version, then any later call to read the same page will in turn wait for
the IO to complete.
--Stephen
--
This is a majordomo managed list. To unsubscribe, send a message with
the body 'unsubscribe linux-mm me@address' to: majordomo@kvack.org