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] add count-only option to DOM0_GETDOMAININFOLIST

To: Anthony Liguori <aliguori@xxxxxxxxxx>
Subject: Re: [Xen-devel] [PATCH] add count-only option to DOM0_GETDOMAININFOLIST hypercall
From: "Mike D. Day" <ncmike@xxxxxxxxxx>
Date: Thu, 23 Mar 2006 05:21:50 -0500
Cc: xen-devel@xxxxxxxxxxxxxxxxxxx
Delivery-date: Thu, 23 Mar 2006 10:23:06 +0000
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <4421F7B5.9090403@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/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
References: <200603230048.k2N0mlxx017489@xxxxxxxxxxxxxxxxxxxxx> <4421F7B5.9090403@xxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Thunderbird 1.5 (Macintosh/20051201)
Anthony Liguori wrote:
There's a race condition here. There's no way of knowing that domains haven't been destroyed (or created) in between these calls.

Unfortunately, the only way to avoid this is grab them one at a time.

The race condition is harmless and the patch is an improvement over the current situation where you have to guess the number of domains (and hence the size of the buffer you allocate).

Most of the time the caller will be looking for a snapshot of domain information, not an up-to-the-instant comprehensive report.

And the pre-existing method of allocating a huge buffer and calling once still works.

Mike

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

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