mirror of
https://github.com/cloud-hypervisor/cloud-hypervisor.git
synced 2026-08-05 02:19:16 +00:00
virtio-balloon: add deflate_on_oom support
Sometimes we need balloon deflate automatically to give memory back to guest, especially for some low priority guest processes under memory pressure. Enable deflate_on_oom to support this. Usage: --balloon "size=0,deflate_on_oom=on" \ Signed-off-by: Fei Li <lifei.shirley@bytedance.com>
This commit is contained in:
@@ -2610,6 +2610,7 @@ impl DeviceManager {
|
||||
virtio_devices::Balloon::new(
|
||||
id.clone(),
|
||||
balloon_config.size,
|
||||
balloon_config.deflate_on_oom,
|
||||
self.seccomp_action.clone(),
|
||||
)
|
||||
.map_err(DeviceManagerError::CreateVirtioBalloon)?,
|
||||
|
||||
Reference in New Issue
Block a user