xc_domain_getinfolist() declaration
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
Signature · 3 lines
Daniel Veillard | Red Hat http://redhat.com/ [email protected] | libxml GNOME XML XSLT toolkit http://xmlsoft.org/ http://veillard.com/ | Rpmfind RPM search engine http://rpmfind.net/
Quoted 11 lines · Daniel Veillard
I would expect
xc_domain_getinfolist()to just be an extended version ofxc_domain_getinfo()but filling-up a range ofxc_dominfo_t. However the declaration inxenctrl.hisint xc_domain_getinfolist(int
xc_handle,
uint32_tfirst_domain,
unsigned intmax_domains,xc_domaininfo_t*info);i.e. a different info pointer type than
Quoted 10 lines
int xc_domain_getinfo(int
xc_handle,
uint32_tfirst_domid,
unsigned intmax_doms,
xc_dominfo_t*info);is that a typo ?
xc_domaininfo_tis defined asdom0_getdomaininfo_t
which is a distinct type fromxc_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
Quoted 4 lines
Daniel
Quoted 28 lines · Anthony Liguori
Quoted 16 lines · Daniel Veillard
I would expect
xc_domain_getinfolist()to just be an extended version ofxc_domain_getinfo()but filling-up a range ofxc_dominfo_t. However the declaration inxenctrl.hisint xc_domain_getinfolist(int
xc_handle,
uint32_tfirst_domain,
unsigned intmax_domains,xc_domaininfo_t*info);i.e. a different info pointer type than
int xc_domain_getinfo(int
xc_handle,
uint32_tfirst_domid,
unsigned intmax_doms,
xc_dominfo_t*info);Quoted 6 lines
is that a typo ?
xc_domaininfo_tis defined asdom0_getdomaininfo_twhich is a distinct type fromxc_dominfo_t, with slightly different characteristics. Any reason for that disparity in the type returned between those two functions ?
xc_domain_getinfolistis a batched interface toxc_domain_getinfofrom the hypervisor perspective. That is, getinfolist will only make a single hypercall whereas getinfo will make up tomax_domshypercalls.
Quoted 7 lines
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 toxc_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
Signature · 3 lines
Daniel Veillard | Red Hat http://redhat.com/ [email protected] | libxml GNOME XML XSLT toolkit http://xmlsoft.org/ http://veillard.com/ | Rpmfind RPM search engine http://rpmfind.net/