Hi,
This is my attempt to a side quest from Cole Robinson reported
in the wiki. It started with an innocent code duplication
reduction work, then I got dragged into code duplication
inside LXC and QEMU drivers. There is a significant amount of
code sharing between LXC and QEMU drivers that should be handled
in a work on its own, but I didn't shy away from the duplications
that are related to vircgroup code in some capacity.
Last 3 patches are an attempt to clean up libvirt_private.syms a
bit, turning some vircgroup functions to static after the changes
made. These are trivial, but annoying changes to review in a single
patch - hence 3 patches to allow for happier reviews. The maintainer is
free to merge the those together when pushing.
Daniel Henrique Barboza (14):
vircgroup: add virCgroupSetupBlkioTune()
vircgroup: add virCgroupSetupMemtune()
vircgroup: add virCgroupSetupCpusetCpus()
vircgroup: add virCgroupSetAndRetrieveCpuShares()
vircgroup: add virCgroupSetupCpuPeriodQuota()
domain_conf: add virDomainMergeBlkioDevice()
domain_conf: add virDomainParseBlkioDeviceStr()
vircgroup: add virCgroupSetupDomainBlkioParameters()
domain_conf: add virDomainParseMergePersistentDefBlkioParams()
vircgroup: add virCgroupSetMemoryLimitParameters()
vircgroup: add virCgroupGetCpuPeriodQuota()
vircgroup: turn virCgroup{Get/Set}BlkioDevice* static
vircgroup: turn SetMemory and SetCpusetCpus functions static
vircgroup: turn more cgroup functions static
src/conf/domain_conf.c | 222 ++++++++++++++++++++
src/conf/domain_conf.h | 13 ++
src/libvirt_private.syms | 31 +--
src/lxc/lxc_cgroup.c | 91 +-------
src/lxc/lxc_driver.c | 428 ++------------------------------------
src/qemu/qemu_cgroup.c | 113 +---------
src/qemu/qemu_driver.c | 399 +----------------------------------
src/util/vircgroup.c | 436 +++++++++++++++++++++++++++++++++++----
src/util/vircgroup.h | 75 +++----
9 files changed, 707 insertions(+), 1101 deletions(-)
--
2.24.1