]> git.ipfire.org Git - thirdparty/libvirt.git/commit
vircgroup.c: add virCgroupSetupCpuShares()
authorDaniel Henrique Barboza <danielhb413@gmail.com>
Mon, 17 Feb 2020 21:29:14 +0000 (16:29 -0500)
committerJán Tomko <jtomko@redhat.com>
Sun, 23 Feb 2020 13:02:23 +0000 (14:02 +0100)
commitd8e5b975001ce9bafea238f4c661dfc0e6b50bb0
tree827d25e0d10ce5767f28e5d8236274b3d8d167bd
parent867c554e52599a17e073ac7315b676b71d63cac4
vircgroup.c: add virCgroupSetupCpuShares()

The code that calls virCgroupSetCpuShares() and virCgroupGetCpuShares()
is repeated in 4 different places. Let's put it in a new
virCgroupSetupCpuShares() to avoid code repetition.

There's a reason of why we execute a Get in the same value we
just executed Set, explained in detail by commit 97814d8ab3.
Let's add a gist of the reasoning behind it as a comment in
this new function as well.

Signed-off-by: Daniel Henrique Barboza <danielhb413@gmail.com>
Signed-off-by: Ján Tomko <jtomko@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
src/libvirt_private.syms
src/lxc/lxc_cgroup.c
src/lxc/lxc_driver.c
src/qemu/qemu_cgroup.c
src/qemu/qemu_driver.c
src/util/vircgroup.c
src/util/vircgroup.h