Subject: Re: clustered pageout of anonymous pages
To: None <marcelo@conectiva.com.br>
From: Chuck Cranor <chuck@xxx.research.att.com>
List: tech-kern
Date: 01/24/2001 20:32:56
In article <Pine.LNX.4.21.0101231135520.9523-100000@freak.distro.conectiva>,
Marcelo Tosatti <marcelo@conectiva.com.br> wrote:
>The swap clustering code in vm/vm_pageout.c builds cluster(s) of pages
>which are not virtually contiguous in a process(es) address mapping.
>Instead, it builds clusters with the pages which are found on the inactive
>swap list. This allows very effective write clustering, but it does not
>allow one to do per-mapping swapin readahead because the pages of a given
>mapping are scattered on the disk.
>Correct?

yes, for the most part.  since UVM can dynamically reassign swap block
allocations it is easy for it to page out a large number of dirty 
inactive pages in a single i/o operation.

this doesn't prevent you from doing readahead ... you could do it 
by queuing multiple read operations to the disk at fault time (by
looking at the neighborhood pages in the amap).  i don't think the 
code i wrote does that though (could be added).


>If so, what advantages/drawbacks of both (effective write clustering or
>possibily of readahead) methods the designer(s) found?

the advantage is that you can always do big cluster single i/o
operation pageouts (provided the swap disk isn't too fragmented).   
that makes recovery from heavy anon memory usage pretty fast (much
faster than the old VM).

the disadvantage is that to do readahead pagein you will have
to do multiple I/O operations since the data will not be contig
on the disk.


chuck
-- 
Chuck Cranor                            http://www.research.att.com/info/chuck
Senior Technical Staff Member		chuck@research.att.com
Internet and Networking Systems Research Lab
AT&T Labs-Research, Florham Park, NJ