From mboxrd@z Thu Jan 1 00:00:00 1970 From: Xiao Guangrong Subject: Re: [PATCH 0/4] KVM: Dirty logging optimization using rmap Date: Tue, 29 Nov 2011 18:09:07 +0800 Message-ID: <4ED4AF43.2040003@linux.vnet.ibm.com> References: <20111114182041.43570cdf.yoshikawa.takuya@oss.ntt.co.jp> <4EC0EC90.1090202@redhat.com> <4EC0F3D3.9090907@oss.ntt.co.jp> <4EC10BFE.7050704@redhat.com> <4EC33C0B.1060807@oss.ntt.co.jp> <4EC37D18.4010609@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Cc: Avi Kivity , Marcelo Tosatti , Takuya Yoshikawa , KVM To: Xiao Guangrong Return-path: Received: from e28smtp02.in.ibm.com ([122.248.162.2]:43468 "EHLO e28smtp02.in.ibm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753107Ab1K2K2A (ORCPT ); Tue, 29 Nov 2011 05:28:00 -0500 Received: from /spool/local by e28smtp02.in.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Tue, 29 Nov 2011 15:39:39 +0530 Received: from d28av04.in.ibm.com (d28av04.in.ibm.com [9.184.220.66]) by d28relay01.in.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id pATA99094632654 for ; Tue, 29 Nov 2011 15:39:10 +0530 Received: from d28av04.in.ibm.com (loopback [127.0.0.1]) by d28av04.in.ibm.com (8.14.4/8.13.1/NCO v10.0 AVout) with ESMTP id pATA98B0023799 for ; Tue, 29 Nov 2011 21:09:09 +1100 In-Reply-To: Sender: kvm-owner@vger.kernel.org List-ID: Sorry, CC list is lost. :( On 11/29/2011 06:01 PM, Xiao Guangrong wrote: > Avi Kivity redhat.com> writes: > >> >> On 11/16/2011 06:28 AM, Takuya Yoshikawa wrote: >>> (2011/11/14 21:39), Avi Kivity wrote: >>>> There was a patchset from Peter Zijlstra that converted mmu notifiers to >>>> be preemptible, with that, we can convert the mmu spinlock to a mutex, >>>> I'll see what happened to it. >>> >>> Interesting! >>> >>>> There is a third method of doing write protection, and that is by >>>> write-protecting at the higher levels of the paging hierarchy. The >>>> advantage there is that write protection is O(1) no matter how large the >>>> guest is, or the number of dirty pages. >>>> >>>> To write protect all guest memory, we just write protect the 512 PTEs at >>>> the very top, and leave the rest alone. When the guest writes to a >>>> page, we allow writes for the top-level PTE that faulted, and >>>> write-protect all the PTEs that it points to. >>> >>> One important point is that the guest, not GET DIRTY LOG caller, will pay >>> for the write protection at the timing of faults. >> >> I don't think there is a significant difference. The number of write >> faults does not change. The amount of work done per fault does, but not >> by much, thanks to the writeable bitmap. >> > > Avi, > > I think it needs more thinking if only less page need be write protected. > > For example, framebuffer-based device used by Xwindow, only ~64M pages needs > to be write protected, but in your way, guest will get write page fault on all > memory? Hmm? > > It has some tricks but i missed? > > -- > To unsubscribe from this list: send the line "unsubscribe kvm" in > the body of a message to majordomo@vger.kernel.org > More majordomo info at http://vger.kernel.org/majordomo-info.html > >