mirror of
https://github.com/kata-containers/kata-containers.git
synced 2025-09-14 13:29:31 +00:00
runtime-rs: add default_maxmemory in config file
add default_maxmemory in config file Fixes:#6875 Signed-off-by: Zhongtao Hu <zhongtaohu.tim@linux.alibaba.com>
This commit is contained in:
@@ -653,6 +653,13 @@ pub struct MemoryInfo {
|
|||||||
/// If swap_in_bytes and memory_limit_in_bytes is not set, the size should be default_memory.
|
/// If swap_in_bytes and memory_limit_in_bytes is not set, the size should be default_memory.
|
||||||
#[serde(default)]
|
#[serde(default)]
|
||||||
pub enable_guest_swap: bool,
|
pub enable_guest_swap: bool,
|
||||||
|
|
||||||
|
/// Default maximum memory in MiB per SB / VM
|
||||||
|
/// unspecified or == 0 --> will be set to the actual amount of physical RAM
|
||||||
|
/// > 0 <= amount of physical RAM --> will be set to the specified number
|
||||||
|
/// > amount of physical RAM --> will be set to the actual amount of physical RAM
|
||||||
|
#[serde(default)]
|
||||||
|
pub default_maxmemory: u32,
|
||||||
}
|
}
|
||||||
|
|
||||||
impl MemoryInfo {
|
impl MemoryInfo {
|
||||||
|
@@ -124,6 +124,8 @@ DEFMEMSZ := 2048
|
|||||||
# - vm template memory
|
# - vm template memory
|
||||||
# - hugepage memory
|
# - hugepage memory
|
||||||
DEFMEMSLOTS := 10
|
DEFMEMSLOTS := 10
|
||||||
|
# Default maximum memory in MiB
|
||||||
|
DEFMAXMEMSZ := 0
|
||||||
##VAR DEFBRIDGES=<number> Default number of bridges
|
##VAR DEFBRIDGES=<number> Default number of bridges
|
||||||
DEFBRIDGES := 0
|
DEFBRIDGES := 0
|
||||||
DEFENABLEANNOTATIONS := [\"kernel_params\"]
|
DEFENABLEANNOTATIONS := [\"kernel_params\"]
|
||||||
@@ -307,6 +309,7 @@ USER_VARS += DEFMAXVCPUS_ACRN
|
|||||||
USER_VARS += DEFMAXVCPUS_DB
|
USER_VARS += DEFMAXVCPUS_DB
|
||||||
USER_VARS += DEFMEMSZ
|
USER_VARS += DEFMEMSZ
|
||||||
USER_VARS += DEFMEMSLOTS
|
USER_VARS += DEFMEMSLOTS
|
||||||
|
USER_VARS += DEFMAXMEMSZ
|
||||||
USER_VARS += DEFBRIDGES
|
USER_VARS += DEFBRIDGES
|
||||||
USER_VARS += DEFNETWORKMODEL_DB
|
USER_VARS += DEFNETWORKMODEL_DB
|
||||||
USER_VARS += DEFNETWORKMODEL_CLH
|
USER_VARS += DEFNETWORKMODEL_CLH
|
||||||
|
@@ -101,6 +101,13 @@ default_bridges = @DEFBRIDGES@
|
|||||||
# If unspecified then it will be set @DEFMEMSZ@ MiB.
|
# If unspecified then it will be set @DEFMEMSZ@ MiB.
|
||||||
default_memory = @DEFMEMSZ@
|
default_memory = @DEFMEMSZ@
|
||||||
|
|
||||||
|
# Default maximum memory in MiB per SB / VM
|
||||||
|
# unspecified or == 0 --> will be set to the actual amount of physical RAM
|
||||||
|
# > 0 <= amount of physical RAM --> will be set to the specified number
|
||||||
|
# > amount of physical RAM --> will be set to the actual amount of physical RAM
|
||||||
|
default_maxmemory = @DEFMAXMEMSZ@
|
||||||
|
|
||||||
|
|
||||||
# Block storage driver to be used for the hypervisor in case the container
|
# Block storage driver to be used for the hypervisor in case the container
|
||||||
# rootfs is backed by a block device. DB only supports virtio-blk.
|
# rootfs is backed by a block device. DB only supports virtio-blk.
|
||||||
block_device_driver = "@DEFBLOCKSTORAGEDRIVER_DB@"
|
block_device_driver = "@DEFBLOCKSTORAGEDRIVER_DB@"
|
||||||
|
Reference in New Issue
Block a user