On Fri, Apr 06, 2007 at 06:20:08PM +0900, Atsushi SAKAI wrote:
Hi,
This patch intends to see and handle scheduler parameters.
This is based on ML discussion.
This patch just support Xen/Credit for Type/Parameters
Xen/SEDF for Type only.
And other scheduler is not supported
but it will be easy to add it.
Okay, this look okay, so I'm tempted to apply it (I will reread it though)
I still have a few comments:
- the function comments for the entry points should probably be augmented
a bit to explain the parameters, this is extremely flexible but a couple
of line of explanations would help
- the proxy entry points should be augmented, and the proxy sources too
to allow the Get operation from a normal user
- I don't think the python bindings can be automatically generated,
and the conversions of the parameters to Python types should be looked at
a bit IMHO.
===How to use (at commandline)===
virsh schedinfo 0
(to see Type/Parameters)
virsh schedinfo 0 --weight 512
(to set weight and to show changed Type/Parameters)
virsh schedinfo 0 --cap 50
(to set cap and to show changed Type/Parameters)
Using 'schedinfo' to set the parameters sounds a bit bizarre, I would expect
an info to be an output only.
===Related to API===
I make API based on Dan's mail.
But I have added a little bit changes.
1)virSchedParameter
Add Unsigned Int and Unsigned Long Long
2)virDomainGetSchedulerType
Add variable to return the number of parameters.
This purposes allocate virSchedParameter memory on virsh not in libvirt.
Sounds sensible to me.
===Others===
0)xen_unified.c
tabspace seems 2, it should be fixed.
If needed, I will post it as another patch.
I use the following command to indent libvirt code:
paphio:~/libvirt -> cat ~/bin/cb
#!/bin/sh
indent -bad -bap -bbb -bli4 -br -ce -brs -cs -i4 -l75 -lc75 -nut -sbi4 -psl -saf -sai -saw
-sbi4 -ss -sc -cdw -cli4 -npcs -nbc
paphio:~/libvirt ->
using GNU indent command.
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/