From 668cb1fa42960ece96b7da8d9204e486ba6dcdf6 Mon Sep 17 00:00:00 2001 From: Aleksandr Nogikh Date: Fri, 16 Jun 2023 19:18:25 +0200 Subject: pkg/kconfig: rewrite Minimize() 1) Use the generic bisection implementation in pkg/bisect. It adds the support of identifying several necessary config diffs at once. 2) For now, limit the number of minimization iterations to 6. It's a lengthy process and we don't want to spend too much time doing this. 3) Bisect over leaf configuration options -- that is, those no other config depends upon. This should make diff split during bisection more reliable. 4) Save all intermediate configs to the debug files folder. --- pkg/vcs/linux.go | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'pkg/vcs') diff --git a/pkg/vcs/linux.go b/pkg/vcs/linux.go index c6effd58a..341e488f4 100644 --- a/pkg/vcs/linux.go +++ b/pkg/vcs/linux.go @@ -379,7 +379,13 @@ type minimizeLinuxCtx struct { func (ctx *minimizeLinuxCtx) minimizeAgainst(base *kconfig.ConfigFile) error { base = base.Clone() ctx.transform(base) - minConfig, err := ctx.kconf.Minimize(base, ctx.config, ctx.pred, ctx) + // Don't do too many minimization runs, it will make bug bisections too long. + // The purpose is only to reduce the number of build/boot/test errors due to bugs + // in unrelated parts of the kernel. + // Bisection is not getting much faster with smaller configs, only more reliable, + // so there's a trade-off. Try to do best in 5 iterations, that's about 1.5 hours. + const minimizeRuns = 5 + minConfig, err := ctx.kconf.Minimize(base, ctx.config, ctx.pred, minimizeRuns, ctx) if err != nil { return err } -- cgit mrf-deployment