lkml.org 
[lkml]   [2010]   [Mar]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH][RF C/T/D] Unmapped page cache control - via boot parameter
* Avi Kivity <avi@redhat.com> [2010-03-15 09:48:05]:

> On 03/15/2010 09:22 AM, Balbir Singh wrote:
> >Selectively control Unmapped Page Cache (nospam version)
> >
> >From: Balbir Singh<balbir@linux.vnet.ibm.com>
> >
> >This patch implements unmapped page cache control via preferred
> >page cache reclaim. The current patch hooks into kswapd and reclaims
> >page cache if the user has requested for unmapped page control.
> >This is useful in the following scenario
> >
> >- In a virtualized environment with cache!=none, we see
> > double caching - (one in the host and one in the guest). As
> > we try to scale guests, cache usage across the system grows.
> > The goal of this patch is to reclaim page cache when Linux is running
> > as a guest and get the host to hold the page cache and manage it.
> > There might be temporary duplication, but in the long run, memory
> > in the guests would be used for mapped pages.
>
> Well, for a guest, host page cache is a lot slower than guest page cache.
>

Yes, it is a virtio call away, but is the cost of paying twice in
terms of memory acceptable? One of the reasons I created a boot
parameter was to deal with selective enablement for cases where
memory is the most important resource being managed.

I do see a hit in performance with my results (please see the data
below), but the savings are quite large. The other solution mentioned
in the TODOs is to have the balloon driver invoke this path. The
sysctl also allows the guest to tune the amount of unmapped page cache
if needed.

The knobs are for

1. Selective enablement
2. Selective control of the % of unmapped pages

--
Three Cheers,
Balbir


\
 
 \ /
  Last update: 2010-03-15 09:09    [W:0.099 / U:2.368 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site