Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DM: Enable QoS in ACRN, based on runC container #2020

Closed
Mingyuan18 opened this issue Dec 10, 2018 · 2 comments
Closed

DM: Enable QoS in ACRN, based on runC container #2020

Mingyuan18 opened this issue Dec 10, 2018 · 2 comments
Assignees
Labels

Comments

@Mingyuan18
Copy link

DM: Enable QoS in ACRN, based on runC container

@Mingyuan18 Mingyuan18 added type: feature New feature status: open The issue is working in progress labels Dec 10, 2018
@Mingyuan18
Copy link
Author

Mingyuan18 commented Dec 10, 2018

[External_System_ID] ACRN-2192

liudlong added a commit to liudlong/acrn-kernel that referenced this issue Dec 10, 2018
This patch adds the configurations for container. We will support
QoS functions in Acrn SOS, and Acrn QoS is based on the container.
We enable the configurations needed by container in the patch.

Tracked-On: projectacrn/acrn-hypervisor#2020
Signed-off-by: Long Liu <long.liu@intel.com>
wenlingz pushed a commit that referenced this issue Dec 12, 2018
This patch adds the runC container config file, we will run acrn-dm
in runC container, and set acrn QoS parameters based on runC.
In the config file we mount SOS root directory to the container and
disable network/mount/ipc namespace.

Tracked-On: #2020
Signed-off-by: Long Liu <long.liu@intel.com>
Acked-by: Yu Wang <yu1.wang@intel.com>
wenlingz pushed a commit to projectacrn/acrn-kernel that referenced this issue Dec 14, 2018
This patch adds the configurations for container. We will support
QoS functions in Acrn SOS, and Acrn QoS is based on the container.
We enable the configurations needed by container in the patch.

Tracked-On: projectacrn/acrn-hypervisor#2020
Signed-off-by: Long Liu <long.liu@intel.com>
wenlingz pushed a commit that referenced this issue Feb 25, 2019
This patch adds the "-C" parameter handing in acrnctl. The "-C"
parameter be introduced for acrn-dm QoS feature. By current acrnctl
implementation, it will dry run the launch_uos.sh script to obtain the
VM name which defined during script execution.
The patch will strip "-C" parameter during the script dry run to avoid
create unexpected container, and add the "-C" parameter to the arguments
file after the script dry run.

Tracked-On: #2020
Signed-off-by: Long Liu <long.liu@intel.com>
Acked-by: Yan, Like <like.yan@intel.com>
wenlingz pushed a commit that referenced this issue Feb 25, 2019
The patch adds logic to delete runC configuration in acrnctl del command.
After launch the VM in container there will have configuration files in user
directory. When delete the VM by "acrnctl del" command the command will delete
the runC configuration files at same time.

Tracked-On: #2020
Signed-off-by: Long Liu <long.liu@intel.com>
Reviewed-by: Yu Wang <yu1.wang@intel.com>
Reviewed-by: Kaige Fu <kaige.fu@intel.com>
Acked-by: Yan, Like <like.yan@intel.com>
wenlingz pushed a commit that referenced this issue Feb 25, 2019
This patch implements acrn-dm QoS. When the script be launched with "-C"
parameter, the acrn-dm will be executed in container for isolating the
resouce of service OS.

The QoS parameter is described in
/usr/share/acrn/samples/apl-mrb/runC.json, users can modify it following
their performance requirements.

Tracked-On: #2020
Signed-off-by: Long Liu <long.liu@intel.com>
Reviewed-by: Binbin Wu <binbin.wu@intel.com>
Reviewed-by: Wang Yu <yu1.wang@intel.com>
wenlingz pushed a commit that referenced this issue Feb 25, 2019
Change the default runC container start application to sh which will be
modified by launch_uos.sh during UOS boot. And the replacement is the
parameter set by "acrnctl add" command.

Tracked-On: #2020
Signed-off-by: Long Liu <long.liu@intel.com>
Reviewed-by: Yu Wang <yu1.wang@intel.com>
wenlingz pushed a commit that referenced this issue Feb 25, 2019
The patch adds more Linux capabilities for runC container. In ACRN runC
we will map native root directory to the container, when we launch UOS from
container it need more Linux capabilities to operate dev node. So add the
capabilities in runC configuration file.

Tracked-On: #2020
Signed-off-by: Long Liu <long.liu@intel.com>
Reviewed-by: Yu Wang <yu1.wang@intel.com>
wenlingz pushed a commit that referenced this issue Feb 25, 2019
The patch changes runC container's default rootfs directory. In the patch
change the rootfs to runC bundle's parent directory. Because in ACRN we map
SOS rootfs to container so the rootfs is an empty directory, after move it to
parent directory all the container can share the same rootfs.

Tracked-On: #2020
Signed-off-by: Long Liu <long.liu@intel.com>
Reviewed-by: Yu Wang <yu1.wang@intel.com>
@Mingyuan18 Mingyuan18 added status: Assigned Assigned and removed status: open The issue is working in progress labels Feb 28, 2019
acrnsi pushed a commit that referenced this issue Mar 29, 2019
The patch adds "-C" parameter in sample launch_uos.sh file to enable
launch Device-Model in runC container. The argments will be linked to
SOS /usr/share/acrn/add/vm1.args, and acrnd will use the it as default
start argument.

Tracked-On: #2020
Signed-off-by: Long Liu <long.liu@intel.com>
Acked-by: Yu Wang <yu1.wang@intel.com>
acrnsi pushed a commit that referenced this issue Mar 29, 2019
The patch adds mount namespace for the container. Without the patch
when we destroy the container, there still have mountinfo for the
container. This is one workaroud for runC bug. If the mount namespace
is disabled, when try to mount host "/" to container "/", there will
cause the issue. Detail discussion as following link.
"https://groups.google.com/a/opencontainers.org/forum/#!searchin/
dev/mount$20namespace%7Csort:date/dev/p10bq-kXODk/obkqBRdxCQAJ"

After enable mount namespace, some small performance imapcts for
specific mediator, likes USB. Will keep monitor runc community,
and revert this patch once related runc patches get integrated.

Tracked-On: #2020
Signed-off-by: Long Liu <long.liu@intel.com>
Acked-by: Yu Wang <yu1.wang@intel.com>
@Mingyuan18
Copy link
Author

Based on runC container, verify some I/O P1 cases on each platform devices, and the function works well.
SOS: 28600
ACRN tag: acrn-2019w14.1-140000p
Kernel: 2018 4.19.31-39

@Mingyuan18 Mingyuan18 added status: closed The issue been closed and removed status: Assigned Assigned labels Apr 10, 2019
dongyaozu pushed a commit that referenced this issue Jun 17, 2019
The patch adds new argument for launch_uos script for NUC.
In the patch add "-C" parameter for launch_uos script. When launch
the script with the parameter the ACRN-dm will be launched in the
runC container. For more information about this please refer to
ACRN-dm QoS document.

Tracked-On: #2020
Signed-off-by: Long Liu <long.liu@intel.com>
Reviewed-by: Binbin Wu binbin.wu@intel.com
Reviewed-by: Geoffroy Van Cutsem geoffroy.vancutsem@intel.com
acrnsi pushed a commit that referenced this issue Jun 26, 2019
The path modify the configuration for the runC container. There have
three changes for the configuration.
1、args [ "sh" ]: this is an example parameter and when the VM is started,
the parameter will be replaced by the launch_UOS script.
2、The linux capabilities will guarantee the Acrn-dm have enough capabilities
to run in container. For more infomation about the capalility you can refer
http://man7.org/linux/man-pages/man7/capabilities.7.htm
3、Move the rootfs to the parent directory, so all the container can share
the same rootfs.

Tracked-On: #2020
Signed-off-by: Long Liu <long.liu@intel.com>
Reviewed-by: Binbin Wu <binbin.wu@intel.com>
wenlingz pushed a commit that referenced this issue Jun 28, 2019
The path modify the configuration for the runC container. There have
three changes for the configuration.
1、args [ "sh" ]: this is an example parameter and when the VM is started,
the parameter will be replaced by the launch_UOS script.
2、The linux capabilities will guarantee the Acrn-dm have enough capabilities
to run in container. For more infomation about the capalility you can refer
http://man7.org/linux/man-pages/man7/capabilities.7.htm
3、Move the rootfs to the parent directory, so all the container can share
the same rootfs.

Tracked-On: #2020
Signed-off-by: Long Liu <long.liu@intel.com>
Reviewed-by: Binbin Wu <binbin.wu@intel.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants