linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Marcelo Tosatti <mtosatti@redhat.com>
To: Xiao Guangrong <xiaoguangrong@linux.vnet.ibm.com>
Cc: Avi Kivity <avi@redhat.com>, LKML <linux-kernel@vger.kernel.org>,
	KVM <kvm@vger.kernel.org>
Subject: Re: [PATCH] KVM: MMU: lazily drop large spte
Date: Mon, 12 Nov 2012 21:10:32 -0200	[thread overview]
Message-ID: <20121112231032.GB5798@amt.cnet> (raw)
In-Reply-To: <50978DFE.1000005@linux.vnet.ibm.com>

On Mon, Nov 05, 2012 at 05:59:26PM +0800, Xiao Guangrong wrote:
> Do not drop large spte until it can be insteaded by small pages so that
> the guest can happliy read memory through it
> 
> The idea is from Avi:
> | As I mentioned before, write-protecting a large spte is a good idea,
> | since it moves some work from protect-time to fault-time, so it reduces
> | jitter.  This removes the need for the return value.
> 
> Signed-off-by: Xiao Guangrong <xiaoguangrong@linux.vnet.ibm.com>
> ---
>  arch/x86/kvm/mmu.c |   34 +++++++++-------------------------
>  1 files changed, 9 insertions(+), 25 deletions(-)

Its likely that other 4k pages are mapped read-write in the 2mb range 
covered by a read-only 2mb map. Therefore its not entirely useful to
map read-only. 

Can you measure an improvement with this change?



  reply	other threads:[~2012-11-12 23:10 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-11-05  9:59 [PATCH] KVM: MMU: lazily drop large spte Xiao Guangrong
2012-11-12 23:10 ` Marcelo Tosatti [this message]
2012-11-13  8:26   ` Xiao Guangrong
2012-11-14 14:37     ` Marcelo Tosatti
2012-11-14 23:17       ` Xiao Guangrong
2012-11-16  3:02         ` Marcelo Tosatti
2012-11-16  3:39           ` Xiao Guangrong
2012-11-16  3:56             ` Marcelo Tosatti
2012-11-16  4:46               ` Xiao Guangrong
2012-11-16  9:57                 ` Marcelo Tosatti
2012-11-17 14:06                   ` Xiao Guangrong
2012-11-18  3:00                     ` Marcelo Tosatti
2012-11-28  5:27                       ` Xiao Guangrong
2012-11-28 11:39                         ` Marcelo Tosatti
2012-11-13 15:33   ` Takuya Yoshikawa
2012-11-14 14:44     ` Marcelo Tosatti
2012-11-14 23:33       ` Xiao Guangrong

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=20121112231032.GB5798@amt.cnet \
    --to=mtosatti@redhat.com \
    --cc=avi@redhat.com \
    --cc=kvm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=xiaoguangrong@linux.vnet.ibm.com \
    /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).