From 3b71af44bb75821dbdc8c7e80a4d09bdb6bd7285 Mon Sep 17 00:00:00 2001 From: Grigory Bazilevich Date: Thu, 23 Oct 2025 23:27:33 +0300 Subject: pkg/mgrconfig: Make slowdown configurable Signed-off-by: Denis Efremov --- pkg/mgrconfig/config.go | 4 ++++ pkg/mgrconfig/load.go | 6 ++++++ 2 files changed, 10 insertions(+) (limited to 'pkg') diff --git a/pkg/mgrconfig/config.go b/pkg/mgrconfig/config.go index db6e10ba8..0e7c17243 100644 --- a/pkg/mgrconfig/config.go +++ b/pkg/mgrconfig/config.go @@ -109,6 +109,10 @@ type Config struct { // long as it preserves `bin` dir structure) Syzkaller string `json:"syzkaller"` + // Slowdown factor: 0 for auto-detection. + // 0 is the default value. + Slowdown int `json:"slowdown"` + // Number of parallel test processes inside of each VM. // Allowed values are 1-32, recommended range is ~4-8, default value is 6. // It should be chosen to saturate CPU inside of the VM and maximize number of test executions, diff --git a/pkg/mgrconfig/load.go b/pkg/mgrconfig/load.go index 86064dc38..b0487d87e 100644 --- a/pkg/mgrconfig/load.go +++ b/pkg/mgrconfig/load.go @@ -122,6 +122,7 @@ func DefaultValues() *Config { RPC: ":0", MaxCrashLogs: 100, Procs: 6, + Slowdown: 0, PreserveCorpus: true, RunFsck: true, Experimental: Experimental{ @@ -284,6 +285,11 @@ func (cfg *Config) initTimeouts() { // Note: the name check is a hack. slowdown = 10 } + + if cfg.Slowdown != 0 { + slowdown = cfg.Slowdown + } + // Note: we could also consider heavy debug tools (KASAN/KMSAN/KCSAN/KMEMLEAK) if necessary. cfg.Timeouts = cfg.SysTarget.Timeouts(slowdown) } -- cgit mrf-deployment