Re: [PATCH] swapin readahead

Stephen C. Tweedie
1998-12-02T17:34:40Z

Hi,

On 01 Dec 1998 18:20:49 +0100, Zlatko Calusic <Zlatko.Calusic@CARNet.hr>
said:

> Yes. something like that. Since nobody asked pages to swap in (we
> decided to swap them in) it looks like nobody frees them. :)
> So we should free them somewhere, probably.

I think read_swap_page_async should be acting as a lookup on the page
cache, so the page it returns is guaranteed to have an incremented
reference count. You'll need to free_page() it just after the
read_swap_page_async() call to get the expected behaviour.

You still need to skip locked swap entries, too.

--Stephen