aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorOphestra <cat@gensokyo.uk>2026-02-26 16:50:35 +0900
committerOphestra <cat@gensokyo.uk>2026-02-26 16:50:35 +0900
commit84e6922f3073ec09756df6075a801529ecd202f6 (patch)
treea408e16f0c90c1e60ddb7ed5bd6412209150caf2
parentc16725a679c4f47a07c27ab947bcba9e21ecac9b (diff)
cmd/mbf: optionally set SCHED_IDLE
None of the other supported policies are applicable here. Signed-off-by: Ophestra <cat@gensokyo.uk>
-rw-r--r--cmd/mbf/main.go10
1 files changed, 10 insertions, 0 deletions
diff --git a/cmd/mbf/main.go b/cmd/mbf/main.go
index 0b6cff82..c65f7e7a 100644
--- a/cmd/mbf/main.go
+++ b/cmd/mbf/main.go
@@ -55,6 +55,7 @@ func main() {
flagCures int
flagBase string
flagTShift int
+ flagIdle bool
)
c := command.New(os.Stderr, log.Printf, "mbf", func([]string) (err error) {
msg.SwapVerbose(!flagQuiet)
@@ -79,6 +80,11 @@ func main() {
cache.SetThreshold(1 << flagTShift)
}
}
+
+ if flagIdle {
+ pkg.SchedPolicy = container.SCHED_IDLE
+ }
+
return
}).Flag(
&flagQuiet,
@@ -96,6 +102,10 @@ func main() {
&flagTShift,
"tshift", command.IntFlag(-1),
"Dependency graph size exponent, to the power of 2",
+ ).Flag(
+ &flagIdle,
+ "sched-idle", command.BoolFlag(false),
+ "Set SCHED_IDLE scheduling policy",
)
{