From mboxrd@z Thu Jan 1 00:00:00 1970 From: Izik Eidus Subject: Re: [PATCH 1/3] kvm: dont hold pagecount reference for mapped sptes pages. Date: Sun, 12 Apr 2009 12:01:48 +0300 Message-ID: <49E1ADFC.9060401@redhat.com> References: <1238457604-7637-1-git-send-email-ieidus@redhat.com> <1238457604-7637-2-git-send-email-ieidus@redhat.com> <20090409095408.GA31724@amt.cnet> <49DDEF83.7010406@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: kvm@vger.kernel.org, avi@redhat.com To: Marcelo Tosatti Return-path: Received: from mx2.redhat.com ([66.187.237.31]:34827 "EHLO mx2.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1757484AbZDLJCl (ORCPT ); Sun, 12 Apr 2009 05:02:41 -0400 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 n3C92fl6008260 for ; Sun, 12 Apr 2009 05:02:41 -0400 In-Reply-To: <49DDEF83.7010406@redhat.com> Sender: kvm-owner@vger.kernel.org List-ID: Izik Eidus wrote: > Marcelo Tosatti wrote: >> On Tue, Mar 31, 2009 at 03:00:02AM +0300, Izik Eidus wrote: >> >>> When using mmu notifiers, we are allowed to remove the page count >>> reference tooken by get_user_pages to a specific page that is mapped >>> inside the shadow page tables. >>> >>> This is needed so we can balance the pagecount against mapcount >>> checking. >>> >>> (Right now kvm increase the pagecount and does not increase the >>> mapcount when mapping page into shadow page table entry, >>> so when comparing pagecount against mapcount, you have no >>> reliable result.) >>> >> >> IMO ifdef'ing CONFIG_MMU_NOTIFIERS here (and keeping the ref if unset) >> instead of in the backward compat code gives less room for headaches. >> >> > That was the first version of this patch, Avi preferred not to do it... > Avi, You mind if i changed it to use the IFDEF ?