On Thu, Oct 25, 2007 at 05:25:25PM +0900, Saori Fukuta wrote:
On Wed, 24 Oct 2007 05:12:42 -0400 Daniel Veillard wrote:
> To extract the cpuset
> you need to call the existing functionalities we have for the vcpu
> affinities (and this may be a bit costly).
>
> > Then, I could not get the cpus values by sexpr_node(root,
"domain/cpus").
> >
> > I guess this is a bug of Xen, and this has not been fixed with latest
> > upstream Xen. So I will work about this for Xen before discussing about
> > how xend exports.
>
> It was never in xen and I think teh new way being based on Xen-API you
> won't get a fix for upstream for our case here. I would not expect a fix
> to xend to get the solution but work it out in libvirt, but you can try ...
I reconsidered about it and I agreed with you, because we won't get
the cpus values when pined several PCPU to each VCPU, like the
following case:
domA VCPU:0 PCPU:0-1
VCPU:1 PCPU:0-1
VCPU:2 PCPU:2
VCPU:3 PCPU:3
And, we certainly can get the vcpu affinities above by other way
(i.e. call "xenDaemonDomainGetVcpus" and analyze the result), but
it will be costly at this time, though I would like to make them.
So could you commit the patch first to support the cpus value
at starting/defining the guest domain for RHEL5.2 ?
Please let me know if you have any comments and suggestions.
Okay sorry it took so long, I got distrated by something else and
I wanted to come back with a more complete patch for the following:
- make sure that cpu expressions coming from the user are reparsed
and translated to ranges to make sure we don't have a mismatch between
the external representations and what is accepted both by libvirt
and xend
- Saving the pinning in the XML makes things really complex.
alls the XML dump routines of xend assume an SExpr input but
the affinity is not available there. Querying xend may be very costly
and it way better to ask at the xen_unified level where the hypervisor
hypercall will be used if available
- as a result I removed the DumpXML entry point from xen_unified because
you need to extend parameters in the xend case
- also when coming from the proxy you just have the domain id and
it's harder to get the cpu list in an efficient way without
messing even more with the code
I still think CPU affinity in the domain is misplaced, but well, okay
I agree to do this for real cpus, this complicates the code a bit though.
The associated patch compiles, but I have not yet tested it, it's
basically how I would expect to finish the NUMA work, but it certainly need
debug and testing. I will look at this tomorrow, but I welcome feedback :-)
Daniel
--
Red Hat Virtualization group
http://redhat.com/virtualization/
Daniel Veillard | virtualization library
http://libvirt.org/
veillard(a)redhat.com | libxml GNOME XML XSLT toolkit
http://xmlsoft.org/
http://veillard.com/ | Rpmfind RPM search engine
http://rpmfind.net/