cmd/mbf: optionally set SCHED_IDLE
All checks were successful
Test / Create distribution (push) Successful in 1m54s
Test / Sandbox (push) Successful in 3m46s
Test / Hakurei (push) Successful in 5m50s
Test / ShareFS (push) Successful in 6m15s
Test / Sandbox (race detector) (push) Successful in 6m43s
Test / Hpkg (push) Successful in 6m54s
Test / Hakurei (race detector) (push) Successful in 7m54s
Test / Flake checks (push) Successful in 1m50s

None of the other supported policies are applicable here.

Signed-off-by: Ophestra <cat@gensokyo.uk>
This commit is contained in:
2026-02-26 16:50:35 +09:00
parent c16725a679
commit 84e6922f30

View File

@@ -55,6 +55,7 @@ func main() {
flagCures int flagCures int
flagBase string flagBase string
flagTShift int flagTShift int
flagIdle bool
) )
c := command.New(os.Stderr, log.Printf, "mbf", func([]string) (err error) { c := command.New(os.Stderr, log.Printf, "mbf", func([]string) (err error) {
msg.SwapVerbose(!flagQuiet) msg.SwapVerbose(!flagQuiet)
@@ -79,6 +80,11 @@ func main() {
cache.SetThreshold(1 << flagTShift) cache.SetThreshold(1 << flagTShift)
} }
} }
if flagIdle {
pkg.SchedPolicy = container.SCHED_IDLE
}
return return
}).Flag( }).Flag(
&flagQuiet, &flagQuiet,
@@ -96,6 +102,10 @@ func main() {
&flagTShift, &flagTShift,
"tshift", command.IntFlag(-1), "tshift", command.IntFlag(-1),
"Dependency graph size exponent, to the power of 2", "Dependency graph size exponent, to the power of 2",
).Flag(
&flagIdle,
"sched-idle", command.BoolFlag(false),
"Set SCHED_IDLE scheduling policy",
) )
{ {