lkml.org 
[lkml]   [2008]   [Sep]   [6]   [last100]   RSS Feed
Views: [more markup]  [less markup]  [headers]  [forward] 
 
Messages in this thread
/
DateSat, 6 Sep 2008 01:42:14 -0400
FromRik van Riel <>
SubjectRe: [PATCH] VM: Implements the swap-out page-clustering technique
On Fri, 5 Sep 2008 21:45:01 +0200
Andi Kleen <andi@firstfloor.org> wrote:

> Yes, but that has nothing to do in how much you should swap cluster.
> 
> AFAIK the main motivation for swap clustering is to avoid the extreme
> seekiness that happens during swap in (that is the main reason
> why swap on Linux often takes so long). And also to use the IO
> device well. IO devices today typically have a "minimum useful 
> unit of IO" which is much larger than a page. Typically it's at least
> a MB, sometimes even more e.g. on flash or on some RAID controllers.  

That is indeed the reason.

Basically, the swap IO size should be large enough that
swap throughput is not incredibly slow when swapping in
lots of related data in a process.

On the other hand, you do want to avoid evicting data 
that the process is still using, just because you are 
swapping out a not recently referenced page on a
nearby virtual address.

I suspect that the swap IO cluster could contain nearby
and virtually contiguous pages that are (1) not recently
referenced and (2) on the inactive list.

Of course, my guess may be wrong - this needs testing :)

-- 
All rights reversed.


\
 
 \ /
  Last update: 2008-09-06 07:45    [from the cache]
©2003-2008