From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ian Campbell Subject: Re: [PATCH 1/3] libxl: In domain death search, start search at first domid we want Date: Wed, 18 Mar 2015 12:19:00 +0000 Message-ID: <1426681140.18247.353.camel@citrix.com> References: <1426606259-9692-1-git-send-email-jfehlig@suse.com> <1426606259-9692-2-git-send-email-jfehlig@suse.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <1426606259-9692-2-git-send-email-jfehlig@suse.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Jim Fehlig Cc: wei.liu2@citrix.com, Ian.Jackson@eu.citrix.com, xen-devel@lists.xen.org List-Id: xen-devel@lists.xenproject.org On Tue, 2015-03-17 at 09:30 -0600, Jim Fehlig wrote: > From: Ian Jackson > > From: Ian Jackson > > When domain_death_xswatch_callback needed a further call to > xc_domain_getinfolist it would restart it with the last domain it > found rather than the first one it wants. > > If it only wants one it will also only ask for one domain. The result > would then be that it gets the previous domain again (ie, the previous > one to the one it wants), which still doesn't reveal the answer to the > question, and it would therefore loop again. > > It's completely unclear to me why I thought it was a good idea to > start the xc_domain_getinfolist with the last domain previously found > rather than the first one left un-confirmed. The code has been that > way since it was introduced. Is it because the xc_domain_getinfolist will fetch at most: int nentries = LIBXL_TAILQ_NEXT(evg, entry) ? 200 : 1; entries? After your change then if the domid we are looking for is the 201st domain then won't we just keep going round looking at the first 200 (undying) domains? Ian.