From: Xiao Guangrong <xiaoguangrong@cn.fujitsu.com>
To: Marcelo Tosatti <mtosatti@redhat.com>
Cc: Avi Kivity <avi@redhat.com>, KVM list <kvm@vger.kernel.org>,
LKML <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH 3/6] KVM MMU: optimize/cleanup for marking parent unsync
Date: Wed, 14 Apr 2010 11:23:38 +0800 [thread overview]
Message-ID: <4BC5353A.30509@cn.fujitsu.com> (raw)
In-Reply-To: <20100413150137.GB24128@amt.cnet>
Marcelo Tosatti wrote:
>>> I'd prefer to not touch it.
>> This patch avoids walk all parents and i think this overload is really unnecessary.
>> It has other tricks in this codepath but i not noticed? :-)
>
> My point is that there is no point in optimizing something unless its
> performance sensitive.
Hi Marcelo,
I think optimizing not only means 'performance' but also means 'smaller code'(maybe 'cleanup'
is more suitable) and 'logic optimize'(do little things), i'm not sure this patch whether can
improve system performance obviously but it optimize the code logic and reduce code size, and
it not harm other code and system performance, right? :-)
Actually, the origin code has a bug, the code segment in mmu_parent_walk():
| if (!sp->multimapped && sp->parent_pte) {
| ......
| return;
| }
| hlist_for_each_entry(pte_chain, node, &sp->parent_ptes, link)
| for (i = 0; i < NR_PTE_CHAIN_ENTRIES; ++i) {
| ......
| }
So, if sp->parent_pte == NULL, it's unsafe...
> And as i recall, mmu_unsync_walk was much more
> sensitive performance wise than parent walking. Actually, gfn_to_memslot
> seems more important since its also noticeable on EPT/NPT hosts.
Yeah, i also noticed these and i'm looking into these code.
Thanks,
Xiao
next prev parent reply other threads:[~2010-04-14 3:26 UTC|newest]
Thread overview: 36+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-04-12 7:59 [PATCH 1/6] KVM MMU: remove unused struct Xiao Guangrong
2010-04-12 8:01 ` [PATCH 2/6] KVM MMU: fix kvm_mmu_zap_page() and its calling path Xiao Guangrong
2010-04-12 8:24 ` Avi Kivity
2010-04-12 8:53 ` Xiao Guangrong
2010-04-12 9:08 ` Avi Kivity
2010-04-12 9:22 ` Xiao Guangrong
2010-04-12 10:25 ` Avi Kivity
2010-04-12 12:22 ` Xiao Guangrong
2010-04-12 12:49 ` Avi Kivity
2010-04-12 17:10 ` Marcelo Tosatti
2010-04-13 1:34 ` Xiao Guangrong
2010-04-13 14:59 ` Marcelo Tosatti
2010-04-14 2:14 ` Xiao Guangrong
2010-04-14 16:31 ` Marcelo Tosatti
2010-04-12 8:02 ` [PATCH 3/6] KVM MMU: optimize/cleanup for marking parent unsync Xiao Guangrong
2010-04-12 8:32 ` Avi Kivity
2010-04-12 8:55 ` Xiao Guangrong
2010-04-12 17:12 ` Marcelo Tosatti
2010-04-13 1:53 ` Xiao Guangrong
2010-04-13 11:58 ` Avi Kivity
2010-04-13 15:01 ` Marcelo Tosatti
2010-04-14 3:23 ` Xiao Guangrong [this message]
2010-04-14 3:58 ` Xiao Guangrong
2010-04-14 16:35 ` Marcelo Tosatti
2010-04-12 8:03 ` [PATCH 4/6] KVM MMU: optimize for writing cr4 Xiao Guangrong
2010-04-12 8:34 ` Avi Kivity
2010-04-12 10:42 ` Xiao Guangrong
2010-04-12 11:22 ` Avi Kivity
2010-04-13 3:07 ` Xiao Guangrong
2010-04-13 6:42 ` Avi Kivity
2010-04-12 8:05 ` [PATCH 5/6] KVM MMU: reduce kvm_mmu_page size Xiao Guangrong
2010-04-12 8:36 ` Avi Kivity
2010-04-12 11:11 ` Xiao Guangrong
2010-04-12 8:06 ` [PATCH 6/6] KVM MMU: optimize synchronization shadow pages Xiao Guangrong
2010-04-12 8:43 ` Avi Kivity
2010-04-12 11:14 ` 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=4BC5353A.30509@cn.fujitsu.com \
--to=xiaoguangrong@cn.fujitsu.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