virtmgr: Add boost_uclamp
To ensure consistent results during testing, passes the boost_uclamp
as a hint to the host scheduler to reduce variance and set
a mininum floor for performance.
Also enable boost_uclamp for Microdroid Boot tests,
partially authored by ioffe.
Bug: 342349882
Test: Booted a VM and checked uClamp
Change-Id: I0d40163515d1a4e41bde6cc81916de51f798813c
Signed-off-by: David Dai <davidai@google.com>
diff --git a/virtualizationmanager/src/crosvm.rs b/virtualizationmanager/src/crosvm.rs
index 4b03bac..79c7b7f 100644
--- a/virtualizationmanager/src/crosvm.rs
+++ b/virtualizationmanager/src/crosvm.rs
@@ -132,6 +132,7 @@
pub tap: Option<File>,
pub virtio_snd_backend: Option<String>,
pub console_input_device: Option<String>,
+ pub boost_uclamp: bool,
}
#[derive(Debug)]
@@ -1054,6 +1055,10 @@
command.arg("--hugepages");
}
+ if config.boost_uclamp {
+ command.arg("--boost-uclamp");
+ }
+
append_platform_devices(&mut command, &mut preserved_fds, &config)?;
debug!("Preserving FDs {:?}", preserved_fds);