public inbox for linux-kbuild@vger.kernel.org
 help / color / mirror / Atom feed
* [RFC] [kbuild test robot] random-order parallel building
@ 2023-05-12  3:25 Masahiro Yamada
  2023-05-12  7:09 ` Philip Li
  0 siblings, 1 reply; 5+ messages in thread
From: Masahiro Yamada @ 2023-05-12  3:25 UTC (permalink / raw)
  To: kernel test robot; +Cc: Linux Kbuild mailing list, Linux Kernel Mailing List

Hello, maintainers of the kbuild test robot.

I have a proposal for the 0day tests.


GNU Make traditionally processes the dependency from left to right.

For example, if you have dependency like this:

     all: foo bar baz

GNU Make builds foo, bar, baz, in this order.


Some projects that are not capable of parallel builds
rely on that behavior implicitly.

Kbuild, however, is intended to work well in parallel.
(As the maintainer, I really care about it.)


From time to time, people add "just worked for me" code,
but apparently that lacks proper dependency.
Sometimes it requires an expensive CPU to reproduce
parallel build issues.


For example, see this report,
  https://lkml.org/lkml/2016/11/30/587

The report says 'make -j112' reproduces the broken parallel build.
Most people do not have such a build machine that comes with 112 cores.
It is difficult to reproduce it (or even notice it).

(Some time later, it was root-caused by 07a422bb213a)



GNU Make 4.4 got this option.

  --shuffle[={SEED|random|reverse|none}]
       Perform shuffle of prerequisites and goals.



'make --shuffle=reverse' will build in reverse order.
In the example above, baz, bar, foo.

'make --shuffle' will randomize the build order.


If there exists a missing dependency among foo, bar, baz,
it will fail to build.



We already perform the randconfig daily basis.
So, random-order parallel building is a similar idea.

Perhaps, it makes sense to add the "--shuffle=SEED" option
but it requires GNU Make 4.4.  (or GNU Make 4.4.1)
Is this too new?



--
Best Regards
Masahiro Yamada

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2023-06-09 16:00 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-05-12  3:25 [RFC] [kbuild test robot] random-order parallel building Masahiro Yamada
2023-05-12  7:09 ` Philip Li
2023-06-09  8:41   ` Liu, Yujie
2023-06-09 15:14     ` Randy Dunlap
2023-06-09 15:59     ` Masahiro Yamada

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox