
于 2011年03月29日 17:09, Daniel Veillard 写道:
On Tue, Mar 29, 2011 at 04:48:30PM +0800, Osier Yang wrote:
Sample of cputune xml: <cputune> <shares>2048</shares> <vcpupin vcpu='0' cpuset='0-4,^3'/> <vcpupin vcpu='1' cpuset='1,2'/> </cputune>
* docs/schemas/domain.rng --- docs/schemas/domain.rng | 31 +++++++++++++++++++++++++++++++ 1 files changed, 31 insertions(+), 0 deletions(-)
diff --git a/docs/schemas/domain.rng b/docs/schemas/domain.rng index 30f673f..0fbf326 100644 --- a/docs/schemas/domain.rng +++ b/docs/schemas/domain.rng @@ -366,6 +366,27 @@ <ref name="countCPU"/> </element> </optional> + +<!-- All the cpu related tunables would go in the cputune --> +<optional> +<element name="cputune"> +<optional> +<element name="shares"> +<ref name="cpushares"/> +</element> +</optional> +<zeroOrMore> +<element name="vcpupin"> +<attribute name="vcpu"> +<ref name="vcpuid"/> +</attribute> +<attribute name="cpuset"> +<ref name="cpuset"/> +</attribute> +</element> +</zeroOrMore> +</element> +</optional> </interleave> </define> <define name="clock"> @@ -2198,6 +2219,16 @@ <param name="minInclusive">1</param> </data> </define> +<define name="vcpuid"> +<data type="unsignedShort"> +<param name="pattern">[0-9]+</param> +</data> +</define> +<define name="cpushares"> +<data type="unsignedInt"> +<param name="pattern">[0-9]+</param> +</data> +</define> <define name="hostName"> <data type="string"> <param name="pattern">[a-zA-Z0-9\.\-]+</param>
Okay, with the doc about the proportional ratios and since it also makes sense for ESX, I remove my objection for cpushare :-)
Once the other few nits are fixed, please push.
Except your doubt on "raising error in qemudDomainPinVcpu if adding vcpupin entry in domain def fails", as I still don't have better idea yet, see: http://libvirt.org/git/?p=libvirt.git;a=commit;h=1cc4d0259c05fa795b587271124..., fixed all the other nits. And pushed the series, Thanks. Regards Osier