From: Keir Fraser Subject: Re: [PATCH] x86: simplify page reference handling for partially (in-)validated pages Date: Mon, 03 Nov 2008 07:58:19 +0000 Message-ID: References: <490EB987.76E4.0078.0@novell.com> Mime-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <490EB987.76E4.0078.0@novell.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: Jan Beulich , xen-devel@lists.xensource.com List-Id: xen-devel@lists.xenproject.org On 3/11/08 07:42, "Jan Beulich" wrote: > As suggested by Keir, simplify general page reference management for > preempted (partiall [in-]validated) pages: Reserve on reference that > can be acquired without the risk of overflowing the reference count, > thus allowing to have a simplified get_page() equivalent that cannot > fail (but must be used with care). > > Doing this conversion pointed out a latent issue in the changes done > previously in this area: The extra reference must be acquired before > the 'normal' reference gets dropped, so the patch fixes this at once > in both the alloc_page_type() and free_page_type() paths (it's really > only the latter that failed to work with the change described above). Yes, that makes the *_page_type() functions quite a bit clearer. Thanks! -- Keir