From mboxrd@z Thu Jan 1 00:00:00 1970 From: Xiao Guangrong Subject: Re: [PATCH v5 0/8] KVM: MMU: fast zap all shadow pages Date: Fri, 17 May 2013 02:26:12 +0800 Message-ID: <519524C4.5060102@linux.vnet.ibm.com> References: <1368706673-8530-1-git-send-email-xiaoguangrong@linux.vnet.ibm.com> <20130516233619.c85d66583e26c6f5d1b409e5@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Cc: gleb@redhat.com, avi.kivity@gmail.com, mtosatti@redhat.com, pbonzini@redhat.com, linux-kernel@vger.kernel.org, kvm@vger.kernel.org To: Takuya Yoshikawa Return-path: Received: from e28smtp02.in.ibm.com ([122.248.162.2]:46112 "EHLO e28smtp02.in.ibm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751540Ab3EPS0V (ORCPT ); Thu, 16 May 2013 14:26:21 -0400 Received: from /spool/local by e28smtp02.in.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Thu, 16 May 2013 23:49:52 +0530 In-Reply-To: <20130516233619.c85d66583e26c6f5d1b409e5@gmail.com> Sender: kvm-owner@vger.kernel.org List-ID: On 05/16/2013 10:36 PM, Takuya Yoshikawa wrote: > On Thu, 16 May 2013 20:17:45 +0800 > Xiao Guangrong wrote: > >> Bechmark result: >> I have tested this patchset and the previous version that only zaps the >> pages linked on invalid slot's rmap. The benchmark is written by myself >> which has been attached, it writes large memory when do pci rom read. >> >> Host: Intel(R) Xeon(R) CPU X5690 @ 3.47GHz + 36G Memory >> Guest: 12 VCPU + 32G Memory >> >> Current code: This patchset Previous Version >> 2405434959 ns 2323016424 ns 2368810003 ns >> >> The interesting thing is, the previous version is slower than this patch, >> i guess the reason is that the former keeps lots of invalid pages in mmu >> which cause shadow page to be reclaimed due to used-pages > request-pages >> or host memory shrink. > > This patch series looks very nice! Thank you, Takuya! > > Minor issues may still need to be improved, but I really hope to see this > get merged during this cycle. > > [for the future] Do you think that postponing some zapping/freeing of > obsolete(already invalidated) pages to make_mmu_pages_available() time > can improve the situation more? -- say, for big guests. Yes, i think it can. :) We have made many efforts on this but still lack a straight way to achieve it. > > If accounting kept correct, make_mmu_pages_available() only needs to free > some obsolete pages instead of valid pages. > Yes.