[lkml]   [2001]   [May]   [2]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: 2.4 and 2GB swap partition limit

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.

To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
More majordomo info at
Please read the FAQ at

 \ /
  Last update: 2005-03-22 12:52    [W:0.108 / U:1.120 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site