pub enum BalloonControllerRequest {
GetBalloonSize {
responder: BalloonControllerGetBalloonSizeResponder,
},
RequestNumPages {
requested_num_pages: u32,
control_handle: BalloonControllerControlHandle,
},
GetMemStats {
responder: BalloonControllerGetMemStatsResponder,
},
}
Expand description
A BalloonController
controls a guest instance’s memory balloon.
Variants§
GetBalloonSize
Get the current and requested number of pages in the memory balloon.
current_num_pages is the number of pages balloon has right now. requested_num_pages is the desired number of pages in the balloon.
‘current_num_pages’ corresponds to the ‘actual’ virtio-balloon config field ‘requested_num_pages’ corresponds to the ‘num_pages’ virtio-balloon config field.
Fields
responder: BalloonControllerGetBalloonSizeResponder
RequestNumPages
Request a number of pages to be supplied to the memory balloon.
If requested_num_pages
is greater than the current_num_pages
config
value, the guest driver SHOULD provide additional pages to the memory balloon.
If requested_num_pages
is less than the ‘current_num_pages’ config value,
the guest driver MAY reclaim pages from the memory balloon.
GetMemStats
Get memory statistics of the guest instance.
Fields
responder: BalloonControllerGetMemStatsResponder
Implementations§
Source§impl BalloonControllerRequest
impl BalloonControllerRequest
pub fn into_get_balloon_size( self, ) -> Option<BalloonControllerGetBalloonSizeResponder>
pub fn into_request_num_pages( self, ) -> Option<(u32, BalloonControllerControlHandle)>
pub fn into_get_mem_stats(self) -> Option<BalloonControllerGetMemStatsResponder>
Sourcepub fn method_name(&self) -> &'static str
pub fn method_name(&self) -> &'static str
Name of the method defined in FIDL