[RFC][PATCH 0/2] Fix zero cpu shares handling

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello,

This series tries to fix the behavior of
<cputune><shares>0</shares></cputune> (means default shares of 1024)
and virsh schedinfo --set cpu_shares=0 (means minimum of 2)

If 0 was explicitly specified, treat it as a valid value (which
will get converted to 2 by the kernel)

Re-read the shares value to reflect the cpu shares in live XML.

In v1, I've tried to change the schedinfo behavior instead,
but I have not found a way to reset the value to the kernel default
(which is currently 1024 - see ROOT_TASK_GROUP_LOAD in
 kernel/sched/sched.h in Linux source) other than writing it
to the cgroup fs.

Partially fixes https://bugzilla.redhat.com/show_bug.cgi?id=998431

Ján Tomko (2):
  Treat zero cpu shares as a valid value
  Show the real cpu shares value in live xml

 src/conf/domain_conf.c | 12 +++++++-----
 src/conf/domain_conf.h |  1 +
 src/lxc/lxc_cgroup.c   | 13 ++++++++++---
 src/lxc/lxc_driver.c   |  8 +++++++-
 src/lxc/lxc_native.c   |  8 +++++---
 src/qemu/qemu_cgroup.c | 12 +++++++++---
 src/qemu/qemu_driver.c | 13 +++++++++++--
 src/vmx/vmx.c          |  1 +
 8 files changed, 51 insertions(+), 17 deletions(-)

-- 
1.8.3.2

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list





[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]