lkml.org 
[lkml]   [2009]   [Aug]   [13]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [RFC] respect the referenced bit of KVM guest pages?
Avi Kivity wrote:
> On 08/13/2009 06:46 PM, Rik van Riel wrote:
>> We need to ignore the referenced bit on active anon pages
>> on very large systems, but it could indeed be helpful to
>> respect the referenced bit on smaller systems.
>>
>> I have no idea where the cut-off between them would be.
>>
>> Maybe at inactive_ratio <= 4 ?
>
> Why do we need to ignore the referenced bit in such cases? To avoid
> overscanning?

Because swapping out anonymous pages tends to be a relatively
rare operation, we'll have many gigabytes of anonymous pages
that all have the referenced bit set (because there was lots
of time between swapout bursts).

Ignoring the referenced bit on active anon pages makes no
difference on these systems, because all active anon pages
have the referenced bit set, anyway.

All we need to do is put the pages on the inactive list and
give them a chance to get referenced.

However, on smaller systems (and cgroups!), the speed at
which we can do pageout IO is larger, compared to the amount
of memory. This means we can cycle through the pages more
quickly and we may want to count references on the active
list, too.

Yes, on smaller systems we'll also often end up with bursty
swapout loads and all pages referenced - but since we have
fewer pages to begin with, it won't hurt as much.

I suspect that an inactive_ratio of 3 or 4 might make a
good cutoff value.

--
All rights reversed.


\
 
 \ /
  Last update: 2009-08-13 18:29    [W:2.306 / U:0.008 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site