Bug 963592

Summary: [virsh cmd] can not set emulator_period
Product: Red Hat Enterprise Linux 7 Reporter: Jincheng Miao <jmiao>
Component: libvirtAssignee: Martin Kletzander <mkletzan>
Status: CLOSED CURRENTRELEASE QA Contact: Virtualization Bugs <virt-bugs>
Severity: medium Docs Contact:
Priority: medium    
Version: 7.0CC: acathrow, dyuan, gsun, lcui, mkletzan, mzhan
Target Milestone: rc   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: libvirt-1.0.6-1.el7 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2014-06-13 12:44:44 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Jincheng Miao 2013-05-16 08:20:28 UTC
Description of problem:
set emulator_period failed, return "error: Unable to find emulator cgroup for rhel7: No such file or directory"

Version-Release number of selected component (if applicable):
libvirt-1.0.5-1.el7.x86_64
qemu-kvm-1.4.0-4.el7.x86_64
kernel-3.9.0-0.55.el7.x86_64

How reproducible:
100%

Steps:

1. edit a domain with:
  <vcpu placement='auto'>2</vcpu>
  <cputune>
    <shares>2048</shares>
    <period>1000000</period>
    <quota>1000</quota>
    <emulator_period>1000000</emulator_period>
    <emulator_quota>1000</emulator_quota>
    <vcpupin vcpu='0' cpuset='0'/>
    <vcpupin vcpu='1' cpuset='1'/>
    <emulatorpin cpuset='2'/>
  </cputune>


2. start it
[root@dhcp-66-71-41 ~]# virsh start rhel7

3. check schedinfo 
[root@dhcp-66-71-41 ~]# virsh schedinfo rhel7
Scheduler      : posix
cpu_shares     : 2048
vcpu_period    : 1000000
vcpu_quota     : 1000
emulator_period: 1000000
emulator_quota : 1000

4. set emulator_period
[root@dhcp-66-71-41 ~]# virsh schedinfo rhel7 --set emulator_period=900000
Scheduler      : posix
error: Unable to find emulator cgroup for rhel7: No such file or directory

Actual results:
cannot set emulator_period. 

Expected results:
set emulator_period successfully.

Comment 2 Jincheng Miao 2013-05-16 08:44:02 UTC
this bug is still in libvirt-1.0.5-2.el7.x86_64.

Comment 3 Martin Kletzander 2013-05-16 09:16:23 UTC
I've found out the problem, but not the root cause, yet.  I'm bisecting the sources now, so I'm assigning it to myself.

Comment 6 Martin Kletzander 2013-05-16 20:24:15 UTC
Moving to POST with upstream commit v1.0.5-243-g0471637:

commit 0471637d5628106d058f0eb5516ffa7d5285cc6f
Author: Martin Kletzander <mkletzan>
Date:   Thu May 16 14:37:54 2013 +0200

    qemu: Fix cgroup handling when setting VCPU BW

Comment 7 Jincheng Miao 2013-06-05 14:20:22 UTC
This bug fix is verified.

# rpm -q libvirt
libvirt-1.0.6-1.el7.x86_64

# virsh schedinfo rhel7
Scheduler      : posix
cpu_shares     : 2048
vcpu_period    : 1000000
vcpu_quota     : 1000
emulator_period: 1000000
emulator_quota : 1000

# virsh schedinfo rhel7 --set emulator_period=900000
Scheduler      : posix
cpu_shares     : 2048
vcpu_period    : 1000000
vcpu_quota     : 1000
emulator_period: 900000
emulator_quota : 1000

Comment 8 Ludek Smid 2014-06-13 12:44:44 UTC
This request was resolved in Red Hat Enterprise Linux 7.0.

Contact your manager or support representative in case you have further questions about the request.