Re: [RFC][PATCH 1/2] Linux/Guest unmapped page cache control

KAMEZAWA Hiroyuki
2010-06-14T07:04:55Z

On Mon, 14 Jun 2010 12:19:55 +0530
Balbir Singh <balbir@linux.vnet.ibm.com> wrote:
> > - Why don't you believe LRU ? And if LRU doesn't work well, should it be
> > fixed by a knob rather than generic approach ?
> > - No side effects ?
>
> I believe in LRU, just that the problem I am trying to solve is of
> using double the memory for caching the same data (consider kvm
> running in cache=writethrough or writeback mode, both the hypervisor
> and the guest OS maintain a page cache of the same data). As the VM's
> grow the overhead is substantial. In my runs I found upto 60%
> duplication in some cases.
>
>
> - Linux vm guys tend to say, "free memory is bad memory". ok, for what
> free memory created by your patch is used ? IOW, I can't see the benefit.
> If free memory that your patch created will be used for another page-cache,
> it will be dropped soon by your patch itself.
>
> Free memory is good for cases when you want to do more in the same
> system. I agree that in a bare metail environment that might be
> partially true. I don't have a problem with frequently used data being
> cached, but I am targetting a consolidated environment at the moment.
> Moreover, the administrator has control via a boot option, so it is
> non-instrusive in many ways.

It sounds that what you want is to improve performance etc. but to make it
easy sizing the system and to help admins. Right ?

>From performance perspective, I don't see any advantage to drop caches
which can be dropped easily. I just use cpus for the purpose it may no
be necessary.

Thanks,
-Kame