From mboxrd@z Thu Jan 1 00:00:00 1970 From: Marcelo Tosatti Subject: Re: KVM: MMU: optimize set_spte for page sync Date: Tue, 9 Dec 2008 16:52:58 +0100 Message-ID: <20081209155258.GA13317@dmt.cnet> 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> <492D2F14.2070705@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: kvm-devel , Eduardo Habkost , Chris Wright To: Avi Kivity Return-path: Received: from mx2.redhat.com ([66.187.237.31]:58142 "EHLO mx2.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752703AbYLISzB (ORCPT ); Tue, 9 Dec 2008 13:55:01 -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 mB9It1kH023324 for ; Tue, 9 Dec 2008 13:55:01 -0500 Content-Disposition: inline In-Reply-To: <492D2F14.2070705@redhat.com> Sender: kvm-owner@vger.kernel.org List-ID: On Wed, Nov 26, 2008 at 01:12:20PM +0200, Avi Kivity wrote: > 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. Avi, Do you have objections for submitting this patch for 2.6.28 ? The hash lookup kills performance of pagetable write + context switch intensive workloads.