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: Thu, 09 Apr 2009 15:52:19 +0300 Message-ID: <49DDEF83.7010406@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> 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]:59468 "EHLO mx2.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754482AbZDIMxP (ORCPT ); Thu, 9 Apr 2009 08:53:15 -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 n39CrEh6006907 for ; Thu, 9 Apr 2009 08:53:14 -0400 In-Reply-To: <20090409095408.GA31724@amt.cnet> Sender: kvm-owner@vger.kernel.org List-ID: 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...