From: Marcelo Tosatti <mtosatti@redhat.com>
To: Lai Jiangshan <laijs@cn.fujitsu.com>
Cc: Avi Kivity <avi@redhat.com>, LKML <linux-kernel@vger.kernel.org>,
kvm@vger.kernel.org
Subject: Re: [PATCH] kvm: rework remove-write-access for a slot
Date: Fri, 4 Jun 2010 12:18:25 -0300 [thread overview]
Message-ID: <20100604151825.GA11087@amt.cnet> (raw)
In-Reply-To: <4C08B5D0.6090104@cn.fujitsu.com>
On Fri, Jun 04, 2010 at 04:14:08PM +0800, Lai Jiangshan wrote:
> Avi Kivity wrote:
> > On 06/02/2010 11:53 AM, Lai Jiangshan wrote:
> >> Current code uses slot_bitmap to find ptes who map a page
> >> from the memory slot, it is not precise: some ptes in the shadow page
> >> are not map any page from the memory slot.
> >>
> >> This patch uses rmap to find the ptes precisely, and remove
> >> the unused slot_bitmap.
Note that the current code is precise: memslot_id does unalias_gfn.
> > Patch looks good; a couple of comments:
> >
> > - We might see a slowdown with !tdp, since we no longer have locality.
> > Each page will map to an spte in a different page. However, it's still
> > worth it in my opinion.
>
> Yes, this patch hurts the cache since we no longer have locality.
> And if most pages of the slot are not mapped(rmap_next(kvm, rmapp, NULL)==NULL),
> this patch will worse than old method I think.
Can you get some numbers before/after patch, with/without lots of shadow
pages instantiated? Better with large amount of memory for the guest.
Because shrinking kvm_mmu_page is good.
next prev parent reply other threads:[~2010-06-04 18:20 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-06-02 8:53 [PATCH] kvm: rework remove-write-access for a slot Lai Jiangshan
2010-06-02 11:18 ` Avi Kivity
2010-06-04 8:14 ` Lai Jiangshan
2010-06-04 15:18 ` Marcelo Tosatti [this message]
2010-06-06 16:04 ` 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=20100604151825.GA11087@amt.cnet \
--to=mtosatti@redhat.com \
--cc=avi@redhat.com \
--cc=kvm@vger.kernel.org \
--cc=laijs@cn.fujitsu.com \
--cc=linux-kernel@vger.kernel.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;
as well as URLs for NNTP newsgroup(s).