From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Mike D. Day" Subject: Re: [PATCH] add count-only option to DOM0_GETDOMAININFOLIST hypercall Date: Thu, 23 Mar 2006 05:21:50 -0500 Message-ID: <442276BE.4040303@us.ibm.com> References: <200603230048.k2N0mlxx017489@mdday.raleigh.ibm.com> <4421F7B5.9090403@us.ibm.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <4421F7B5.9090403@us.ibm.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: Anthony Liguori Cc: xen-devel@lists.xensource.com List-Id: xen-devel@lists.xenproject.org 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