Re: 2.4 and 2GB swap partition limit

From: Stephen C. Tweedie (sct@redhat.com)
Date: Tue May 01 2001 - 11:35:58 EST


Hi,

On Tue, May 01, 2001 at 06:14:54PM +0200, Rogier Wolff wrote:

> Shouldn't the algorithm be:
>
> - If (current_access == write )
> free (swap_page);
> else
> map (page, READONLY)
>
> and
> when a write access happens, we fault again, and map free the
> swap-page as it is now dirty anyway.

That's what 2.2 did. 2.4 doesn't have to.

The trouble is, you really want contiguous virtual memory to remain
contiguous on swap. Freeing individual pages like this on fault can
cause a great deal of fragmentation in swap. We'd far rather keep the
swap page reserved for future use by the same page so that the VM
region remains contiguous on disk.

That's fine as far as it goes, but the problem happens if you _never_
free up such pages. We should reap the unused swap page if we run out
of swap. We don't, and _that_ is the problem --- not the fact that
the page is left allocated in the first place, but the fact that we
don't do anything about it once we are short on disk.

--Stephen
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Mon May 07 2001 - 21:00:12 EST