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: [PATCH] Enhance memory exchange to support foreign domain -- Was RE:

To: "Jiang, Yunhong" <yunhong.jiang@xxxxxxxxx>
Subject: Re: [PATCH] Enhance memory exchange to support foreign domain -- Was RE: [Xen-devel] [PATCH 6/6] Change MMU_PT_UPDATE_RESERVE_AD to support update page table for foreign domain
From: Keir Fraser <keir.fraser@xxxxxxxxxxxxx>
Date: Tue, 30 Jun 2009 11:40:06 +0100
Cc: Xen-devel <xen-devel@xxxxxxxxxxxxxxxxxxx>
Delivery-date: Tue, 30 Jun 2009 03:40:34 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <E2263E4A5B2284449EEBD0AAB751098402CD0206AD@xxxxxxxxxxxxxxxxxxxxxxxxxxxx>
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: Acnh4J83XJstlRtsS9u8RG96aAW7awAoIXfQAAM2lcAAAXUgAAABlLc2Ba8R1JAAA0w13wAAURtgAAKPnIE=
Thread-topic: [PATCH] Enhance memory exchange to support foreign domain -- Was RE: [Xen-devel] [PATCH 6/6] Change MMU_PT_UPDATE_RESERVE_AD to support update page table for foreign domain
User-agent: Microsoft-Entourage/12.19.0.090515
On 30/06/2009 10:40, "Jiang, Yunhong" <yunhong.jiang@xxxxxxxxx> wrote:

>> B. Your adjustment of tot_pages is confusing. I can't
>> convince myself the
>> arithmetic is correct. Furthermore messing with tot_pages
>> outside of the
>> d->page_alloc_lock is not allowed.
> 
> The idea of the adjustment is:
> 
> In each loop, we remove some pages (the in_chunk_list) without decrease the
> tot_pages. Then when we get domain is dying when assign pages (the
> out_chunk_list), we need decrease the count. For those page that has been
> assigned, it should be covered by domain_relinquish_resources(), so what we
> need decrease is:
> the number that has been removed - the number that has been assigned already.

There's still quite a logical leap to the arithmetic in your code. Spell it
out in a comment.

 -- Keir



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

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