[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] DOM0_GETDOMAININFO intended behavior
On Saturday 04 June 2005 12:42, Christian Limpach wrote: > On 6/4/05, Daniel Stekloff <dsteklof@xxxxxxxxxx> wrote: > > On Saturday 04 June 2005 01:20, Ian Pratt wrote: > > > > :-) > > > > > > > > I asked the same question a week or two ago and yes it is > > > > intended. It provides for easy iteration. I think it is kind > > > > of a hackish interface as it isn't uniform with *all* the > > > > other DOM0 calls. However, it works and once you know to > > > > check the domid return value your code will work as expected. > > > > > > I suppose we could add a flag to indicate whether you were iterating or > > > wanted information on a specific domain. I think currently the only > > > case where we want to iterate is 'xm list'. > > > > If you're ok with changing the interface, wouldn't it be better for the > > hypercall to get and return just the requested domain info while you move > > the interation to libxc? The library could have two calls, one which > > calls the other: xc_domain_getinfo() and xc_domain_getinfo_list() > > This doesn't scale well if your domain id space is sparse, which it > can easily become on a server which has many domains restarting > frequently. This is the reason for the current behaviour. > > I don't see what's wrong with the current behaviour anyway, how hard > is it to check if the call succeeded and then additionally check if > information for the requested domain was returned? We could avoid the > additional check by having a different return code for when the call > succeeded but returned information for a different domain than the > requested one. Sorry... I didn't mean to make a big deal of this... I just needed to make sure if it was intended. Now I can go an patch vm-list to deal with this correctly. You're right, it isn't difficult to check what is returned - provided you know what to expect. If you're new, however, to the API and unfamiliar with the fact that it returns the next domain in the line, you could hit what we just hit. We built an application to use the interface and our tests returned some odd behavior. We had to delve deeper to find out if this was correct or not. This led us to query you. The current behavior is just not obvious. Perhaps just documenting it in the code and the manual is enough so others don't hit this. Thanks, Dan _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxxxxxxxx http://lists.xensource.com/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |