[Libvir] [PATCH] Xen: Support cpu_weight and cpu_cap for Xen.

Tatsuro Enokura fj7716hz at aa.jp.fujitsu.com
Fri Oct 26 09:17:05 UTC 2007

Hi, Daniel

Daniel Veillard wrote:
>> >> I set the information of cpu_weight/cpu_cap to configuration file or
>> >> sxp format, and execute "virsh start".
>> >> But the information of weight/cap is lost.
>> >> libvirt doesn't support cpu_weight and cpu_cap for XML format.
> >
> >   Right. To me cpu_weight and cpu_cap are tuning informations
> > they are completely dependant:
> >     - on the hypervisor used (only Xen)
> >     - on a specific scheduler for said hypervisor
> >     - on the runtime operations conditions, i.e. you may want to
> >       revise those settings if you migrate the domain, or change
> >       anything on the target host
> >
> >  So you are suggesting to add this to the XML, while for me this makes little
> > sense because of all this specificity.
> > I have no doubt the patch would 'work' for you, but anybody using a different
> > hypervisor, or different scheduler, or even someone trying to understand what
> > those fields are would have no use or informations (your patch does not provide
> > documentation for the meaning of those attributes).
> >
> >   I have a problem with extending the XML in a way which makes sense
> > only for one hypervisor, when using a specific scheduler, and without
> > a proper definition for what the extension actually means.

Yes, scheduler funtcion is xen specific. Other hypervisor(like qemu, kvm...)
hasn't scheduer function.
Threfore, extending weight/cap for the XML is meaningless for other hypervisor.
The libvirt scheduler API is xen specific, it is necessary to add for XML's
documentation that attributes weight/cap is effective only in xen.

> >   Also Those informations are highly runtime dependant, it's tuning,
> > it is not critical at all to get that tuning to get the domain up and
> > running, and once it is running you can actually use the libvirt API
> > to make the scheduler tuning.
> >
> >   Can you explain why you absolutely want to have that tuning information
> > in the XML itself ?

In xentool case, weight/cap set by user to configuration file/sxp
is seting at starting the domain. The user may not do anything.
In libvirt case, the user should set weight/cap using libvirt api
after starting the domain.
I think that it is not convenient for the user.

Tatsuro Enokura

More information about the libvir-list mailing list