On 18/05/21 12:49, Thomas Huth wrote:
- - JOBS=$(expr $(nproc) + 1)
+ - JOBS=$(nproc || echo 1)
The basic idea of the "+ 1" was to make sure that there is always a
thread that runs on a CPU while maybe another one is waiting for I/O to
complete.
Ah, I see. It doesn't make much sense for "make check" jobs however,
which is where I wanted to get with the next patch.
I'm not sure it's even true anymore with current build machines (which
tend to have a large buffer cache for headers) and optimizing compilers
that compilation is I/O bound, so I'll time the two and see if there is
an actual difference.
Paolo
This is suggested by various sites on the web, e.g.:
https://unix.stackexchange.com/questions/519092/what-is-the-logic-of-using-nproc-1-in-make-command
So not sure whether this patch here make sense ... I'd rather drop it.