[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH] Reclaim orphaned swap pages
On Tue, 3 Apr 2001, Richard Jerrell wrote:
> > > That's not really what I'm getting at. Currently if you run a memory
> > > intensive application, quit after it's pages are on an lru, and try to
> > > restart, you won't be able to get the memory. This is because pages which
> > > are sitting around in the swap cache are not counted as free, and they
> > > should be, because they are freeable.
> >
> > No. Dirty swapcache pages which have pte's referencing them are not
> > freeable.
>
> If you quit the application, it no longer has ptes which are referencing
> the page. If, in addition, this page no longer has any ptes referencing
> it, then it is wasting space. That is why we free the page (providing
> that the swap entry is not shared either). Otherwise, you will run out of
> memory because everything is stuck in the swap cache until it gets
> laundered, regardless of whether anyone is still referencing the
> page. That is not a good thing, which is what the patch fixes.
Right.
But you should not count _all_ swapcache pages as freeable.
--
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/