mirror of
https://github.com/cloud-hypervisor/cloud-hypervisor.git
synced 2026-08-05 02:19:16 +00:00
virtio-balloon: Add memory_actual_size to vm.info to show memory actual size
The virtio-balloon change the memory size is asynchronous. VirtioBalloonConfig.actual of balloon device show current balloon size. This commit add memory_actual_size to vm.info to show memory actual size. Signed-off-by: Hui Zhu <teawater@antfin.com>
This commit is contained in:
@@ -1493,6 +1493,11 @@ impl Vm {
|
||||
|
||||
Ok(())
|
||||
}
|
||||
|
||||
/// Gets the actual size of the balloon.
|
||||
pub fn get_balloon_actual(&self) -> u64 {
|
||||
self.memory_manager.lock().unwrap().get_balloon_actual()
|
||||
}
|
||||
}
|
||||
|
||||
impl Pausable for Vm {
|
||||
|
||||
Reference in New Issue
Block a user