From mboxrd@z Thu Jan 1 00:00:00 1970 From: Izik Eidus Subject: Re: [PATCH] shrinker support for the mmu cache Date: Thu, 13 Mar 2008 01:32:13 +0200 Message-ID: <47D867FD.3050302@qumranet.com> References: <1205345621.16712.4.camel@localhost.localdomain> <47D832DB.9020209@codemonkey.ws> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Cc: kvm-devel To: Anthony Liguori Return-path: In-Reply-To: <47D832DB.9020209@codemonkey.ws> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: kvm-devel-bounces@lists.sourceforge.net Errors-To: kvm-devel-bounces@lists.sourceforge.net List-Id: kvm.vger.kernel.org Anthony Liguori wrote: > Izik Eidus wrote: >> this patch simply register the mmu cache with the shrinker. > > Please inline patches in the future as it makes it easier to review. I knew this time will come when ppl will force me to send patchs inline (will happen next time )... :) > The implementation looks good and I think it's a good idea. > > One is that there is one shrinker for all VMs but you run through the > list of VMs in order. This means the first VM in the list is most > frequently going to be shrunk down to KVM_MIN_ALLOC_MMU_PAGES. This > seems unfair and potentially dangerous. The shrinker can be triggered > potentially by the growth of the MMU cache on other VMs. > > I think in the least, you should attempt to go through the VMs in a > round-robin fashion to ensure that if you shrink one VM, the next time > you'll shrink a different VM. you are 100% right, i will do that. > > The other thing I wonder about is whether DEFAULT_SEEKS is the best > value to use. On the one hand, a guest page fault is probably not as > expensive as reclaiming something from disk. On the other hand, NPT > guests are likely to be very sensitive to evicting things from the > shadow page cache. I would think it's pretty clear that in the NPT > case, the MMU cache should have a higher seek cost than the default. let me look at this, i think you have a case > > Regards, > > Anthony Liguori > >> ------------------------------------------------------------------------ >> >> ------------------------------------------------------------------------- >> >> This SF.net email is sponsored by: Microsoft >> Defy all challenges. Microsoft(R) Visual Studio 2008. >> http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ >> ------------------------------------------------------------------------ >> >> _______________________________________________ >> kvm-devel mailing list >> kvm-devel@lists.sourceforge.net >> https://lists.sourceforge.net/lists/listinfo/kvm-devel >> > ------------------------------------------------------------------------- This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/