From mboxrd@z Thu Jan 1 00:00:00 1970 From: Avi Kivity Subject: Re: KVM: MMU: optimize set_spte for page sync Date: Wed, 26 Nov 2008 13:12:20 +0200 Message-ID: <492D2F14.2070705@redhat.com> References: <20081121184927.GA20607@dmt.cnet> <4929322D.7050503@redhat.com> <20081124120423.GB4379@dmt.cnet> <20081124132306.GA13532@dmt.cnet> <492C0DD5.7070206@redhat.com> <20081125145807.GA14994@dmt.cnet> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: kvm-devel To: Marcelo Tosatti Return-path: Received: from mx2.redhat.com ([66.187.237.31]:40971 "EHLO mx2.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751806AbYKZLM0 (ORCPT ); Wed, 26 Nov 2008 06:12:26 -0500 Received: from int-mx2.corp.redhat.com (int-mx2.corp.redhat.com [172.16.27.26]) by mx2.redhat.com (8.13.8/8.13.8) with ESMTP id mAQBCQbY010210 for ; Wed, 26 Nov 2008 06:12:26 -0500 In-Reply-To: <20081125145807.GA14994@dmt.cnet> Sender: kvm-owner@vger.kernel.org List-ID: Marcelo Tosatti wrote: > > Here it goes. > > KVM: MMU: optimize set_spte for page sync > > The write protect verification in set_spte is unnecessary for page sync. > > Its guaranteed that, if the unsync spte was writable, the target page > does not have a write protected shadow (if it had, the spte would have > been write protected under mmu_lock by rmap_write_protect before). > > Same reasoning applies to mark_page_dirty: the gfn has been marked as > dirty via the pagefault path. > > The cost of hash table and memslot lookups are quite significant if the > workload is pagetable write intensive resulting in increased mmu_lock > contention. > > Applied, thanks. -- error compiling committee.c: too many arguments to function