From 17ad682625af9d3ffe649770e32846f04c7ece78 Mon Sep 17 00:00:00 2001 From: Drew Macrae Date: Wed, 21 Dec 2022 10:23:54 -0500 Subject: [PATCH] [opentitantool] Run "nice"r sims Fix some timing issues by running sims with nice -5 to ensure test harnesses don't get starved of threads. This should solve some batch testing problems with a large number of threads serving verilator simulations. Signed-off-by: Drew Macrae --- sw/host/opentitanlib/src/transport/verilator/subprocess.rs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/sw/host/opentitanlib/src/transport/verilator/subprocess.rs b/sw/host/opentitanlib/src/transport/verilator/subprocess.rs index 5743ca7839bd1..ff7043c83cb1b 100644 --- a/sw/host/opentitanlib/src/transport/verilator/subprocess.rs +++ b/sw/host/opentitanlib/src/transport/verilator/subprocess.rs @@ -35,9 +35,10 @@ pub struct Subprocess { impl Subprocess { /// Starts a verilator [`Subprocess`] based on [`Options`]. pub fn from_options(options: Options) -> Result { - let mut command = Command::new(&options.executable); + let mut command = Command::new(String::from("nice")); let mut args = Vec::new(); - + args.push(String::from("-5")); + args.push(options.executable.to_string()); if !options.rom_image.is_empty() { args.push(format!("--meminit=rom,{}", options.rom_image)); }