From 84e6922f3073ec09756df6075a801529ecd202f6 Mon Sep 17 00:00:00 2001 From: Ophestra Date: Thu, 26 Feb 2026 16:50:35 +0900 Subject: [PATCH] cmd/mbf: optionally set SCHED_IDLE None of the other supported policies are applicable here. Signed-off-by: Ophestra --- cmd/mbf/main.go | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/cmd/mbf/main.go b/cmd/mbf/main.go index 0b6cff8..c65f7e7 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", ) {