diff --git a/Cargo.lock b/Cargo.lock index 47af2f8..6a17391 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -931,7 +931,6 @@ dependencies = [ "crossbeam", "ctrlc", "libbpf-rs", - "libc", "log", "scx_cargo", "scx_stats", diff --git a/Cargo.toml b/Cargo.toml index 275f54f..34ff3b6 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -10,7 +10,6 @@ anyhow = "1.0" clap = { version = "4", features = ["derive", "env", "wrap_help"] } ctrlc = { version = "3.4", features = ["termination"] } libbpf-rs = "=0.26.2" -libc = "0.2" log = "0.4" scx_stats = "1.1.3" scx_stats_derive = "1.1.3" diff --git a/flake.nix b/flake.nix index c5e58e3..e3dfbee 100644 --- a/flake.nix +++ b/flake.nix @@ -188,8 +188,23 @@ MSG type = lib.types.ints.positive; default = 1000; description = '' - Timeslice in microseconds. 1000 is the measured knee: see - docs/slice.md. 4194 restores BMQ's own value. + Timeslice in microseconds. 1000 is the measured knee: the + same compile took 4m49s at 4194 and 4m39s at both 1000 and + 500. 4194 restores BMQ's own value. + ''; + }; + + boostOnWake = lib.mkOption { + type = lib.types.bool; + default = false; + description = '' + Boost a waking task in proportion to how long it slept. + + BMQ means to do this but ships the line as a comparison rather + than a subtraction, so in practice it never happens. Measured + both ways: off halves the interactive tail past 1 ms, in 63 of + 68 paired intervals, at no cost in compile time. See + docs/boost-on-wake.md. true restores the intended behaviour. ''; }; @@ -220,7 +235,7 @@ MSG extraArgs = lib.mkOption { type = lib.types.listOf lib.types.str; default = [ ]; - example = [ "--boost-on-wake" "false" ]; + example = [ "--debug" ]; }; notify = { @@ -267,6 +282,7 @@ MSG (lib.getExe cfg.package) "--slice-us" (toString cfg.sliceUs) "--starve-ms" (toString cfg.starveMs) + "--boost-on-wake" (lib.boolToString cfg.boostOnWake) "--timeout-ms" (toString cfg.timeoutMs) "--report-sec" (toString cfg.reportSec) ] ++ cfg.extraArgs);