Re: [PATCH v5 0/8] KVM: MMU: fast zap all shadow pages

From: Xiao Guangrong
Date: Thu May 16 2013 - 14:26:27 EST

On 05/16/2013 10:36 PM, Takuya Yoshikawa wrote:
> On Thu, 16 May 2013 20:17:45 +0800
> Xiao Guangrong <xiaoguangrong@xxxxxxxxxxxxxxxxxx> 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.


To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at
Please read the FAQ at