Bug 1749247 - [cgroup_v2] schedinfo cmd cannot set vcpu/emulator/global/iothread period values
Summary: [cgroup_v2] schedinfo cmd cannot set vcpu/emulator/global/iothread period values
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux Advanced Virtualization
Classification: Red Hat
Component: libvirt
Version: 8.1
Hardware: x86_64
OS: Linux
high
medium
Target Milestone: rc
: 8.1
Assignee: Pavel Hrdina
QA Contact: yisun
URL:
Whiteboard:
Depends On: 1749227
Blocks:
TreeView+ depends on / blocked
 
Reported: 2019-09-05 08:23 UTC by yisun
Modified: 2020-11-06 04:49 UTC (History)
5 users (show)

Fixed In Version: libvirt-5.6.0-5.el8
Doc Type: If docs needed, set a value
Doc Text:
Clone Of: 1749227
Environment:
Last Closed: 2019-11-06 07:19:21 UTC
Type: Bug
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2019:3723 0 None None None 2019-11-06 07:19:50 UTC

Description yisun 2019-09-05 08:23:58 UTC
+++ 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.

Comment 1 Pavel Hrdina 2019-09-06 07:27:18 UTC
Upstream commit:

commit 0bd4ad193d8ba7f0104f4739f19f2731e7cf9f56
Author: Pavel Hrdina <phrdina>
Date:   Thu Sep 5 11:22:11 2019 +0200

    vircgroupv2: fix setting cpu.max period

Comment 4 yisun 2019-09-17 11:57:58 UTC
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)

Comment 6 errata-xmlrpc 2019-11-06 07:19:21 UTC
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


Note You need to log in before you can comment on or make changes to this bug.