From mboxrd@z Thu Jan 1 00:00:00 1970 From: Marcelo Tosatti Subject: Re: [PATCH] shrinker support for the mmu cache Date: Wed, 12 Mar 2008 19:59:27 -0300 Message-ID: <20080312225927.GA30597@dmt> References: <1205345621.16712.4.camel@localhost.localdomain> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Cc: kvm-devel To: Izik Eidus Return-path: Content-Disposition: inline In-Reply-To: <1205345621.16712.4.camel@localhost.localdomain> 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 On Wed, Mar 12, 2008 at 08:13:41PM +0200, Izik Eidus wrote: > this patch simply register the mmu cache with the shrinker. Hi Izik, Nice. I think you want some sort of aging mechanism here. Walk through all translations of a shadow page clearing the referenced bit of all mappings it holds (and moving pages with any accessed translation to the head of the list). Because the active_mmu list position only indicates the order in which those pages have been shadowed, not how frequently or recently they have been accessed. And then have a maximum number of pages that you walk (nr_to_scan) on each shrinker callback run. Oh, I don't think you want to free more than one page on each run (right now you can free a large of chunk per run). ------------------------------------------------------------------------- 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/