WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

Re: [Xen-devel] [PATCH] x86: simplify page reference handling for partia

To: Jan Beulich <jbeulich@xxxxxxxxxx>, <xen-devel@xxxxxxxxxxxxxxxxxxx>
Subject: Re: [Xen-devel] [PATCH] x86: simplify page reference handling for partially (in-)validated pages
From: Keir Fraser <keir.fraser@xxxxxxxxxxxxx>
Date: Mon, 03 Nov 2008 07:58:19 +0000
Cc:
Delivery-date: Sun, 02 Nov 2008 23:58:30 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <490EB987.76E4.0078.0@xxxxxxxxxx>
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
Thread-index: Ack9ie83LYOG36l9Ed2HKAAWy6hiGQ==
Thread-topic: [Xen-devel] [PATCH] x86: simplify page reference handling for partially (in-)validated pages
User-agent: Microsoft-Entourage/11.4.0.080122
On 3/11/08 07:42, "Jan Beulich" <jbeulich@xxxxxxxxxx> 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



_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel

<Prev in Thread] Current Thread [Next in Thread>