public inbox for kvm@vger.kernel.org
 help / color / mirror / Atom feed
From: Izik Eidus <izike@qumranet.com>
To: Marcelo Tosatti <marcelo@kvack.org>
Cc: kvm-devel <kvm-devel@lists.sourceforge.net>
Subject: Re: [PATCH] shrinker support for the mmu cache
Date: Thu, 13 Mar 2008 01:23:23 +0200	[thread overview]
Message-ID: <47D865EB.5000302@qumranet.com> (raw)
In-Reply-To: <20080312225927.GA30597@dmt>

Marcelo Tosatti wrote:
> 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,
>   
Hello Marcelo,

> Nice.
>
> I think you want some sort of aging mechanism here. 

well it is long time in the todo list to do some kind of lru for the 
shadow mmu pages
right now it "recycle" pages in a random way...

> 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).
>   
ok, i think i will just add a function named "sort_accessed_mmu_pages",
that will just put to the top of the list the pages pointed by the ptes 
that werent accessed
and used it when i shrink, and when pages get recycled

this what you meant right?
> 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.
>   

yep

> 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).
>
>   

thanks.

-------------------------------------------------------------------------
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/

  reply	other threads:[~2008-03-12 23:23 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-03-12 18:13 [PATCH] shrinker support for the mmu cache Izik Eidus
2008-03-12 19:45 ` Anthony Liguori
2008-03-12 23:32   ` Izik Eidus
2008-03-12 22:59 ` Marcelo Tosatti
2008-03-12 23:23   ` Izik Eidus [this message]
2008-03-13 21:55     ` Marcelo Tosatti
2008-03-16 11:28   ` Avi Kivity
2008-03-17 13:53     ` Marcelo Tosatti
2008-03-17 14:41       ` Avi Kivity
2008-03-17 21:33         ` Marcelo Tosatti
2008-03-18  6:29           ` Avi Kivity

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=47D865EB.5000302@qumranet.com \
    --to=izike@qumranet.com \
    --cc=kvm-devel@lists.sourceforge.net \
    --cc=marcelo@kvack.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox