All of lore.kernel.org
 help / color / mirror / Atom feed
* xc_domain_getinfolist() declaration
@ 2005-10-24 15:03 Daniel Veillard
  2005-10-24 19:27 ` Anthony Liguori
  0 siblings, 1 reply; 3+ messages in thread
From: Daniel Veillard @ 2005-10-24 15:03 UTC (permalink / raw)
  To: xen-devel

 I would expect xc_domain_getinfolist() to just be an extended version
of xc_domain_getinfo() but filling-up a range of xc_dominfo_t. However
the declaration in xenctrl.h is 

  int xc_domain_getinfolist(int xc_handle,
                            uint32_t first_domain,
			    unsigned int max_domains,
			    xc_domaininfo_t *info);

i.e. a different info pointer type than

  int xc_domain_getinfo(int xc_handle,
                        uint32_t first_domid,
			unsigned int max_doms,
			xc_dominfo_t *info);

is that a typo ? xc_domaininfo_t is defined as dom0_getdomaininfo_t
which is a distinct type from xc_dominfo_t, with slightly different 
characteristics. Any reason for that disparity in the type returned
between those two functions ?

Daniel

-- 
Daniel Veillard      | Red Hat http://redhat.com/
veillard@redhat.com  | libxml GNOME XML XSLT toolkit  http://xmlsoft.org/
http://veillard.com/ | Rpmfind RPM search engine http://rpmfind.net/

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: xc_domain_getinfolist() declaration
  2005-10-24 15:03 xc_domain_getinfolist() declaration Daniel Veillard
@ 2005-10-24 19:27 ` Anthony Liguori
  2005-10-25  8:27   ` Daniel Veillard
  0 siblings, 1 reply; 3+ messages in thread
From: Anthony Liguori @ 2005-10-24 19:27 UTC (permalink / raw)
  To: veillard; +Cc: xen-devel

Daniel Veillard wrote:

> I would expect xc_domain_getinfolist() to just be an extended version
>of xc_domain_getinfo() but filling-up a range of xc_dominfo_t. However
>the declaration in xenctrl.h is 
>
>  int xc_domain_getinfolist(int xc_handle,
>                            uint32_t first_domain,
>			    unsigned int max_domains,
>			    xc_domaininfo_t *info);
>
>i.e. a different info pointer type than
>
>  int xc_domain_getinfo(int xc_handle,
>                        uint32_t first_domid,
>			unsigned int max_doms,
>			xc_dominfo_t *info);
>
>is that a typo ? xc_domaininfo_t is defined as dom0_getdomaininfo_t
>which is a distinct type from xc_dominfo_t, with slightly different 
>characteristics. Any reason for that disparity in the type returned
>between those two functions ?
>  
>
xc_domain_getinfolist is a batched interface to xc_domain_getinfo from 
the hypervisor perspective.  That is, getinfolist will only make a 
single hypercall whereas getinfo will make up to max_doms hypercalls.

getinfo massages the returned data into a more python friendly structure 
(xc_dominfo_t) whereas getinfolist returns the raw results from the 
hypercall (which is just typedef'd to xc_domaininfo_t.

The argument for getinfolist was performance.  Applications that require 
as low-overhead as possible polling info polling mechanism can use 
getinfolist.

Regards,

Anthony Liguori

>Daniel
>
>  
>

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: xc_domain_getinfolist() declaration
  2005-10-24 19:27 ` Anthony Liguori
@ 2005-10-25  8:27   ` Daniel Veillard
  0 siblings, 0 replies; 3+ messages in thread
From: Daniel Veillard @ 2005-10-25  8:27 UTC (permalink / raw)
  To: Anthony Liguori; +Cc: xen-devel

On Mon, Oct 24, 2005 at 02:27:52PM -0500, Anthony Liguori wrote:
> Daniel Veillard wrote:
> 
> >I would expect xc_domain_getinfolist() to just be an extended version
> >of xc_domain_getinfo() but filling-up a range of xc_dominfo_t. However
> >the declaration in xenctrl.h is 
> >
> > int xc_domain_getinfolist(int xc_handle,
> >                           uint32_t first_domain,
> >			    unsigned int max_domains,
> >			    xc_domaininfo_t *info);
> >
> >i.e. a different info pointer type than
> >
> > int xc_domain_getinfo(int xc_handle,
> >                       uint32_t first_domid,
> >			unsigned int max_doms,
> >			xc_dominfo_t *info);
> >
> >is that a typo ? xc_domaininfo_t is defined as dom0_getdomaininfo_t
> >which is a distinct type from xc_dominfo_t, with slightly different 
> >characteristics. Any reason for that disparity in the type returned
> >between those two functions ?
> > 
> >
> xc_domain_getinfolist is a batched interface to xc_domain_getinfo from 
> the hypervisor perspective.  That is, getinfolist will only make a 
> single hypercall whereas getinfo will make up to max_doms hypercalls.
> 
> getinfo massages the returned data into a more python friendly structure 
> (xc_dominfo_t) whereas getinfolist returns the raw results from the 
> hypercall (which is just typedef'd to xc_domaininfo_t.
> 
> The argument for getinfolist was performance.  Applications that require 
> as low-overhead as possible polling info polling mechanism can use 
> getinfolist.

  Okay, thanks !

Daniel

-- 
Daniel Veillard      | Red Hat http://redhat.com/
veillard@redhat.com  | libxml GNOME XML XSLT toolkit  http://xmlsoft.org/
http://veillard.com/ | Rpmfind RPM search engine http://rpmfind.net/

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2005-10-25  8:27 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-10-24 15:03 xc_domain_getinfolist() declaration Daniel Veillard
2005-10-24 19:27 ` Anthony Liguori
2005-10-25  8:27   ` Daniel Veillard

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.