[libvirt] [PATCH 0/3] unify memtune value representation in libvirt

Pavel Hrdina phrdina at redhat.com
Wed Mar 4 16:17:04 UTC 2015


The first patch rewrites virsh memtune command to accept 0 as valid value
instead of ignoring it.

In the second patch I'll introduce a simple helper to crop the *_limit values
to VIR_DOMAIN_MEMORY_PARAM_UNLIMITED as its used several times while reading
values from cgroups.

The last patch actually changes the internal representation of unlimited memtune
settings.  More detailed description is in commit message.  My motivation to
change it completely is to prevent future bugs with those limits.

Pavel Hrdina (3):
  virsh: fix memtune to also accept 0 as valid value
  virutil: introduce helper to set memory limits
  memtune: change the way how we store unlimited value

 docs/formatdomain.html.in                          |  4 +-
 src/conf/domain_conf.c                             | 75 +++++++++++++++++-----
 src/libvirt-domain.c                               |  3 +
 src/lxc/lxc_cgroup.c                               | 18 +++---
 src/lxc/lxc_driver.c                               |  3 -
 src/lxc/lxc_fuse.c                                 | 12 ++--
 src/lxc/lxc_native.c                               |  6 +-
 src/openvz/openvz_conf.c                           |  4 +-
 src/openvz/openvz_driver.c                         |  4 +-
 src/qemu/qemu_cgroup.c                             | 24 +++----
 src/qemu/qemu_command.c                            |  8 ++-
 src/qemu/qemu_driver.c                             |  6 +-
 src/qemu/qemu_hotplug.c                            |  2 +-
 src/qemu/qemu_migration.c                          |  5 +-
 src/util/virutil.c                                 |  8 +--
 src/util/virutil.h                                 |  4 ++
 tests/qemuxml2argvdata/qemuxml2argv-memtune.xml    |  2 +-
 .../qemuxml2xmloutdata/qemuxml2xmlout-memtune.xml  |  2 +-
 tools/virsh-domain.c                               | 62 ++++++------------
 19 files changed, 140 insertions(+), 112 deletions(-)

-- 
2.0.5




More information about the libvir-list mailing list