lkml.org 
[lkml]   [2000]   [Mar]   [29]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: Question on swap space management
Hi,

On Wed, Mar 29, 2000 at 03:58:12PM +0200, Marco Colombo wrote:

> Sorry for starting another Linux mm related thread, but I have a question
> for mm gurus:
> is swap space made availble after a page-in operation? When the page
> is mapped to a page-frame, there's no need to hold a copy on swap.
> Can such a swap space be reclaimed when the system is low on swap?

The swap page is preserved on disk as long as you don't write to the
copy in memory. In other words, if you have dirty data in your process
anonymous pages and those pages get swapped out, then subsequent
swap ins due to read accesses of the same data will effectively mmap
the swap page into memory: as long as the contents of memory match
what is on the disk, we keep both around. As a result, we can swap
the data out of memory without any further IO if we need to make more
space. Only once the copy in memory gets modified do we release the
copy on disk.

--Stephen

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

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