From mboxrd@z Thu Jan 1 00:00:00 1970 From: Kip Macy Subject: Re: semantics of GETDOMAININFO Date: Sun, 8 May 2005 16:17:48 -0700 Message-ID: References: <59b0cc0feef1cf941df30e24b38dc143@cl.cam.ac.uk> Reply-To: Kip Macy Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Return-path: In-Reply-To: <59b0cc0feef1cf941df30e24b38dc143@cl.cam.ac.uk> Content-Disposition: inline List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: Keir Fraser Cc: xen-devel List-Id: xen-devel@lists.xenproject.org That seems reasonable - but I find its lack of uniformity a bit grating.=20 Maybe instead of having the current domain be first fit, we could add a "next_domid" field. That way when "xm list" and the like want to enumerate, provided they start zero, they can keep querying until next_domid =3D=3D -1. I can't think of a case when one wouldn't enumerate the domains starting at zero. So, at least superficially, it seems like a reasonable alternative. I'm willing to accept the possiblity that I'm just nitpicking so I won't push it. -Kip On 5/8/05, Keir Fraser wrote: >=20 > On 8 May 2005, at 22:39, Kip Macy wrote: >=20 > > One of the things that I've always thought was weird, but didn't pay > > too close attention to is the fact that GETDOMAININFO will return a > > valid result even if we give it a domid that is no longer valid. > > Looking at the code we get back the first valid domain after the domid > > we pass in. > > > > What is the reason for this design choice? When I request the > > attributes of a process I don't get the attributes for the next pid up > > with a pid field set to the process id of the process I actually got > > the attributes for. >=20 > Easy enumeration when we don't know which domain id's are in use. There > are other ways to allow for enumeration that might be neater. >=20 > -- Keir >=20 >