From: Xiao Guangrong <xiaoguangrong@linux.vnet.ibm.com>
To: Marcelo Tosatti <mtosatti@redhat.com>
Cc: Avi Kivity <avi@redhat.com>, LKML <linux-kernel@vger.kernel.org>,
KVM <kvm@vger.kernel.org>
Subject: Re: [PATCH 5/9] KVM: MMU: fask check write-protect for direct mmu
Date: Fri, 20 Jul 2012 21:33:58 +0800 [thread overview]
Message-ID: <50095E46.5070207@linux.vnet.ibm.com> (raw)
In-Reply-To: <20120720110908.GB16859@amt.cnet>
On 07/20/2012 07:09 PM, Marcelo Tosatti wrote:
> On Fri, Jul 20, 2012 at 10:34:28AM +0800, Xiao Guangrong wrote:
>> On 07/20/2012 08:39 AM, Marcelo Tosatti wrote:
>>> On Tue, Jul 17, 2012 at 09:53:29PM +0800, Xiao Guangrong wrote:
>>>> If it have no indirect shadow pages we need not protect any gfn,
>>>> this is always true for direct mmu without nested
>>>>
>>>> Signed-off-by: Xiao Guangrong <xiaoguangrong@linux.vnet.ibm.com>
>>>
>>> Xiao,
>>>
>>> What is the motivation? Numbers please.
>>>
>>
>> mmu_need_write_protect is the common path for both soft-mmu and
>> hard-mmu, checking indirect_shadow_pages can skip hash-table walking
>> for the case which is tdp is enabled without nested guest.
>
> I mean motivation as observation that it is a bottleneck.
>
>> I will post the Number after I do the performance test.
>>
>>> In fact, what case was the original indirect_shadow_pages conditional in
>>> kvm_mmu_pte_write optimizing again?
>>>
>>
>> They are the different paths, mmu_need_write_protect is the real
>> page fault path, and kvm_mmu_pte_write is caused by mmio emulation.
>
> Sure. What i am asking is, what use case is the indirect_shadow_pages
> optimizing? What scenario, what workload?
>
Sorry, Marcelo, i do know why i completely misunderstood your mail. :(
I am not sure whether this is a bottleneck, i just got it from
code review, i will measure it to see if we can get benefit from
it. :p
> See the "When to optimize" section of
> http://en.wikipedia.org/wiki/Program_optimization.
>
> Can't remember why indirect_shadow_pages was introduced in
> kvm_mmu_pte_write.
>
Please refer to:
https://lkml.org/lkml/2011/5/18/174
next prev parent reply other threads:[~2012-07-20 13:33 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-07-17 13:50 [PATCH 1/9] KVM: x86: remvoe unnecessary mark_page_dirty Xiao Guangrong
2012-07-17 13:51 ` [PATCH 2/9] KVM: x86: simplify read_emulated Xiao Guangrong
2012-07-19 23:58 ` Marcelo Tosatti
2012-07-20 2:17 ` Xiao Guangrong
2012-07-20 10:58 ` Marcelo Tosatti
2012-07-20 13:15 ` Xiao Guangrong
2012-07-20 19:52 ` Marcelo Tosatti
2012-07-23 4:23 ` Xiao Guangrong
2012-07-17 13:52 ` [PATCH 3/9] KVM: x86: introduce set_mmio_exit_info Xiao Guangrong
2012-07-20 0:03 ` Marcelo Tosatti
2012-07-20 2:24 ` Xiao Guangrong
2012-07-17 13:52 ` [PATCH 4/9] KVM: MMU: track the refcount when unmap the page Xiao Guangrong
2012-07-20 0:09 ` Marcelo Tosatti
2012-07-17 13:53 ` [PATCH 5/9] KVM: MMU: fask check write-protect for direct mmu Xiao Guangrong
2012-07-20 0:39 ` Marcelo Tosatti
2012-07-20 2:34 ` Xiao Guangrong
2012-07-20 11:09 ` Marcelo Tosatti
2012-07-20 13:33 ` Xiao Guangrong [this message]
2012-07-20 3:45 ` Xiao Guangrong
2012-07-20 11:45 ` Marcelo Tosatti
2012-07-17 13:54 ` [PATCH 6/9] KVM: using get_fault_pfn to get the fault pfn Xiao Guangrong
2012-07-17 13:54 ` [PATCH 7/9] KVM: mark do not extern bad_pfn Xiao Guangrong
2012-07-17 13:55 ` [PATCH 8/9] KVM: remove is_error_hpa Xiao Guangrong
2012-07-17 13:56 ` [PATCH 9/9] KVM: remove the unused parameter of gfn_to_pfn_memslot Xiao Guangrong
2012-07-20 0:40 ` [PATCH 1/9] KVM: x86: remvoe unnecessary mark_page_dirty Marcelo Tosatti
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=50095E46.5070207@linux.vnet.ibm.com \
--to=xiaoguangrong@linux.vnet.ibm.com \
--cc=avi@redhat.com \
--cc=kvm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mtosatti@redhat.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).