On 10/29/2021 7:31 AM, Michal Prívozník wrote:
On 10/22/21 5:37 PM, Praveen K Paladugu wrote:
> From: Vineeth Pillai <viremana(a)linux.microsoft.com>
>
> Signed-off-by: Vineeth Pillai <viremana(a)linux.microsoft.com>
> Signed-off-by: Praveen K Paladugu <prapal(a)linux.microsoft.com>
> ---
> po/POTFILES.in | 1 +
> src/ch/ch_cgroup.c | 457 ++++++++++++++++++++++++++++++++++++++++++++
> src/ch/ch_cgroup.h | 45 +++++
> src/ch/ch_conf.c | 2 +
> src/ch/ch_conf.h | 4 +-
> src/ch/ch_domain.c | 33 ++++
> src/ch/ch_domain.h | 3 +-
> src/ch/ch_monitor.c | 125 ++++++++++--
> src/ch/ch_monitor.h | 54 +++++-
> src/ch/ch_process.c | 288 +++++++++++++++++++++++++++-
> src/ch/ch_process.h | 3 +
> src/ch/meson.build | 2 +
> 12 files changed, 991 insertions(+), 26 deletions(-)
> create mode 100644 src/ch/ch_cgroup.c
> create mode 100644 src/ch/ch_cgroup.h
>
> diff --git a/po/POTFILES.in b/po/POTFILES.in
> index b554cf08ca..3a8db501bc 100644
> --- a/po/POTFILES.in
> +++ b/po/POTFILES.in
> @@ -19,6 +19,7 @@
> @SRCDIR(a)src/bhyve/bhyve_parse_command.c
> @SRCDIR(a)src/bhyve/bhyve_process.c
> @SRCDIR(a)src/ch/ch_conf.c
> +@SRCDIR(a)src/ch/ch_cgroup.c
> @SRCDIR(a)src/ch/ch_domain.c
> @SRCDIR(a)src/ch/ch_driver.c
> @SRCDIR(a)src/ch/ch_monitor.c
> diff --git a/src/ch/ch_cgroup.c b/src/ch/ch_cgroup.c
> new file mode 100644
> index 0000000000..6be2184cf1
> --- /dev/null
> +++ b/src/ch/ch_cgroup.c
> @@ -0,0 +1,457 @@
> +/*
> + * ch_cgroup.c: CH cgroup management
This file is a verbatim copy of qemu_cgroup.c (except for some
formatting shenanigans). I wonder whether instead of copying code we can
move it under hypervisor agnostic location (src/hypervisor/) and then
only call respective functions from either of drivers. What do you think?
Michal
Makes sense Michal.That is our intent as well. I posted this version to
inputs on where would be a good place to move this common code. Will
re-structure this commit to consolidate the code in ch and qemu drivers
under src/hypervisor.
--
Regards,
Praveen K Paladugu