Messages in this thread | | | Date | Wed, 29 Mar 2000 17:34:57 +0100 | From | "Stephen C. Tweedie" <> | Subject | Re: 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/
| |