At 06/10/2011 08:32 PM, Adam Litke Write:
On 06/10/2011 05:25 AM, Taku Izumi wrote:
>
>> --- snip ---
>> <cputune>
>> ...
>> <cfs_period>1000000</cfs_period>
>> <cfs_quota>500000</cfs_quota>
>> </cputune>
>> --- snip ---
>
> I think the element name should be generic and
> the percentage (0..100 or 0..vcpu*100) is better as
> the element value. That's intuitive to me.
>
> How about the follwing?
>
> <cputune>
> <capping>50</capping>
> <cputune>
>
> If it is not possible to control enough only one
> "capping" parameter, how about passing the other parameter
> as qemu driver's parameter via /etc/libvirt/qemu.conf ?
>
I think it is important to be able to set the period. The reason that
cpu.cfs_period_us is exposed at all by the cgroup controller is because
the setting might need to be changed. What about making period optional
by defining the units for period and quota as follows:
period: An optional attribute specified in microseconds.
quota: A percentage of the period that the cpus may run.
If quota is an optional attribute specified in microseconds, it should be
in the range [1000, 18446744073709551(2^64/1000)] or less than 0.
I can use maxInclusive to make sure that the value is not greater than 2^64/1000,
but I do not know how to make sure that the value is not in the range [0, 1000).
If quota is a percentage of the period, it is hard to limit the value in the
file domain.rng. If we want to check the value, we need to know the period's value.
This way 'period' can be omitted or changed independently from quota.