+++ This bug was initially created as a clone of Bug #1749227 +++ [cgroup_v2] schedinfo cmd cannot set vcpu/emulator/global/iothread period values Version: libvirt-5.6.0-4.virtcov.el8.x86_64 How reproducible: 100% Steps: 1. Quota values can be set successfully by schedinfo as follow: [root@hp-dl320eg8-12 machine-qemu\x2d2\x2dvm2.scope]# virsh schedinfo vm2 --set vcpu_quota=333333 emulator_quota=333333 global_quota=333333 iothread_quota=333333 Scheduler : posix cpu_shares : 100 vcpu_period : 100000 vcpu_quota : 333333 emulator_period: 100000 emulator_quota : 333333 global_period : 100000 global_quota : 333333 iothread_period: 100000 iothread_quota : 333333 [root@hp-dl320eg8-12 machine-qemu\x2d2\x2dvm2.scope]# cat cpu.max vcpu*/cpu.max iothread*/cpu.max emulator/cpu.max 333333 100000 333333 100000 333333 100000 333333 100000 333333 100000 2. Period values cannot be set by schedinfo as follow: [root@hp-dl320eg8-12 machine-qemu\x2d2\x2dvm2.scope]# virsh schedinfo vm2 --set vcpu_period=222222 emulator_period=222222 global_period=222222 iothread_period=222222 Scheduler : posix cpu_shares : 100 vcpu_period : 100000 vcpu_quota : 333333 emulator_period: 100000 emulator_quota : 333333 global_period : 100000 global_quota : 333333 iothread_period: 100000 iothread_quota : 333333 <==== nothing changed [root@hp-dl320eg8-12 machine-qemu\x2d2\x2dvm2.scope]# cat cpu.max vcpu*/cpu.max iothread*/cpu.max emulator/cpu.max 333333 100000 333333 100000 333333 100000 333333 100000 333333 100000 <===== nothing changed 3. Period values can be set by shell cmd [root@hp-dl320eg8-12 machine-qemu\x2d2\x2dvm2.scope]# for i in {cpu.max,emulator/cpu.max,iothread1/cpu.max,vcpu0/cpu.max,vcpu1/cpu.max}; do echo '333333 222222' > $i; done [root@hp-dl320eg8-12 machine-qemu\x2d2\x2dvm2.scope]# cat cpu.max vcpu*/cpu.max iothread*/cpu.max emulator/cpu.max 333333 222222 333333 222222 333333 222222 333333 222222 333333 222222 [root@hp-dl320eg8-12 machine-qemu\x2d2\x2dvm2.scope]# virsh schedinfo vm2 Scheduler : posix cpu_shares : 100 vcpu_period : 222222 vcpu_quota : 333333 emulator_period: 222222 emulator_quota : 333333 global_period : 222222 global_quota : 333333 iothread_period: 222222 iothread_quota : 333333 Expected result: In Step 2, the ‘schedinfo’ should be able to successfully set the period related values.
Upstream commit: commit 0bd4ad193d8ba7f0104f4739f19f2731e7cf9f56 Author: Pavel Hrdina <phrdina> Date: Thu Sep 5 11:22:11 2019 +0200 vircgroupv2: fix setting cpu.max period
PASSED in auto test job with libvirt-5.6.0-5.module+el8.1.0+4229+2e4e348c.x86_64: https://libvirt-jenkins.rhev-ci-vms.eng.rdu2.redhat.com/job/libvirt-RHEL-8.1-runtest-x86_64-function-guest_resource_control/10/testReport/ (the single failed case is a script issue, not related to this bz)
Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory, and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://access.redhat.com/errata/RHBA-2019:3723