[libvirt] [PATCH 1/2] qemu: Resolve issue with virsh schedinfo for non running domain

Martin Kletzander mkletzan at redhat.com
Fri Jun 7 11:55:36 UTC 2013


On 06/07/2013 12:19 PM, Daniel P. Berrange wrote:
> On Thu, May 30, 2013 at 08:24:59AM -0400, John Ferlan wrote:
>> Since commit '632f78ca' the 'virsh schedinfo <domain>' command returns:
>>
>> Scheduler      : Unknown
>> error: Requested operation is not valid: cgroup CPU controller is not mounted
>>
>> Prior to that change a non running domain would return:
>>
>> Scheduler      : posix
>> cpu_shares     : 0
>> vcpu_period    : 0
>> vcpu_quota     : 0
>> emulator_period: 0
>> emulator_quota : 0
>>
>> This change will result in the following:
>>
>> Scheduler      : posix
>> cpu_shares     : 0
> 
> Hmm, no this isn't right. The entire approach of this method to changing
> the set of tunables reported, according to the state of cgroups is broken
> by design.
> 
> We should always unconditionally report all 5 tunables whether running
> or shutoff.
> 

As I mentioned in my reply, this is right.  However, the only difference
is that qemuDomainGetSchedulerParametersFlags() in QEMU driver doesn't
honor VIR_DOMAIN_AFFECT_CURRENT.

> Then when starting a guest, we should report an error if the admin has
> set a non-default  emulator_quota/emulator_period values and the
> corresponding cgrpoups aren't available.
> 

This should be handled automatically already, if I'm not mistaken.
Worth checking, though.

> Likewise when changing tunables on a running guest, we should report
> an error if the admin attempts to change the values of tunables that
> are not currently supported.
> 

And this is already fixed in commit v1.0.4-21-ge7cd284.

Martin




More information about the libvir-list mailing list