Re: [PATCH v2 07/14] vircgroup.c: add virCgroupSetupCpuShares()

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

 



On Mon, Feb 17, 2020 at 04:29:14PM -0500, Daniel Henrique Barboza wrote:
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.

Whoa, that was a long time ago.

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@xxxxxxxxx>
---
src/libvirt_private.syms |  1 +
src/lxc/lxc_cgroup.c     |  5 +----
src/lxc/lxc_driver.c     |  6 ++----
src/qemu/qemu_cgroup.c   |  5 ++---
src/qemu/qemu_driver.c   |  5 +----
src/util/vircgroup.c     | 20 ++++++++++++++++++++
src/util/vircgroup.h     |  2 ++
7 files changed, 29 insertions(+), 15 deletions(-)


Reviewed-by: Ján Tomko <jtomko@xxxxxxxxxx>

Jano

Attachment: signature.asc
Description: PGP signature


[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]

  Powered by Linux