CVSROOT:        /cvs
Module name:    src
Changes by:     t...@cvs.openbsd.org    2025/05/17 14:13:13

Modified files:
        gnu/llvm/lld/ELF: Driver.cpp 

Log message:
Default to a maximum of 4 threads for ld.lld

This is one of those typical 'more is better' defaults that are just bad.
Even on systems that are much better at parallelism than OpenBSD, people
noticed that 'let me use as many threads as CPUs' isn't helping anything:

https://github.com/llvm/llvm-project/commit/da68d2164efcc1f5e57f090e2ae2219056b120a0

This is the above LLVM commit (which was pointed out by mpi and others)
with s/16/4/g.

This reduces wall clock time and especially system time of builds
significantly on machines with far more CPUs than our beloved OS can
properly handle these days such as claudio's ampere box. On my 8 core
bulk builder I don't see a significant change in wall clock time but
a lot less spin during linking of monsters. Anything with more than 8
CPUs benefits from not calling sched_yield() until the cows come home.

tested by claudio, landry and myself

Reply via email to