From 85d3bc23807fe7752030fc5bc3fd21c75e7bb5c9 Mon Sep 17 00:00:00 2001 From: Juliusz Sosinowicz Date: Thu, 11 Jun 2026 23:42:17 +0000 Subject: [PATCH] parallel-make-check: drop the --jobs option wolfSSL's configure enables make's jobserver by default (AX_AM_JOBSERVER([yes]) -> AM_MAKEFLAGS += -j in aminclude.am), and automake passes that explicit -j to every recursive sub-make, where it overrides the invoking make's job limit. The script's -j therefore only ever scheduled the outermost recursion hop: --jobs was inert. Measured on a 4-CPU host with 10 build-only configs oversaturating the worker pool, the jobserver default is also the better policy: capping sub-makes via --disable-jobserver and -j2 dropped CPU utilization from 96% to 89% and lengthened the wall time, because configs' serial phases (configure, link) stopped being backfilled by other configs' compile jobs. So make is now invoked with no -j at all - parallelism within a config comes from the configure-default jobserver - and the misleading knob is gone, including the macOS job's --jobs 3. --- .github/scripts/parallel-make-check.py | 13 +++++++++---- .github/workflows/os-check.yml | 2 +- 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/.github/scripts/parallel-make-check.py b/.github/scripts/parallel-make-check.py index 9395470e99..0b8061e871 100755 --- a/.github/scripts/parallel-make-check.py +++ b/.github/scripts/parallel-make-check.py @@ -238,7 +238,14 @@ def run_config(cfg, opts): configure.append(f"CC={cfg.cc}") flags = [f"CFLAGS={cfg.cflags}"] if cfg.cflags else [] flags += [f"LDFLAGS={cfg.ldflags}"] if cfg.ldflags else [] - make = ["make", f"-j{opts.jobs}"] + flags + # No -j here: wolfSSL's configure enables make's jobserver by default + # (AX_AM_JOBSERVER adds AM_MAKEFLAGS += -j), and that explicit + # -j on every automake sub-make overrides whatever the top-level make + # was given, so a -j here would only schedule the outermost recursion + # hop. Measured across this pool, the jobserver default also utilizes + # the CPUs better than a capped -j (configs' serial phases - configure, + # link - get backfilled by other configs' compile jobs). + make = ["make"] + flags steps = [] if cfg.user_settings: # Staged before configure; --enable-usersettings builds pick it up @@ -349,7 +356,7 @@ def summarize(results, wall_min, cpu_min, nthreads): # thread-minutes available (a long config left for last idles the other # workers and drags it down); CPU utilization is the CPU time the build # and test children actually consumed out of the CPU-minutes available - # (too-shallow make -j and serial test phases show up here). + # (serial configure/link/test phases show up here). busy_min = sum(minutes for _, _, minutes in results) ncpu = nproc() lines += [ @@ -380,8 +387,6 @@ def main(): p.add_argument("configs", nargs="*", metavar="NAME", help="configs to run (default: all)") p.add_argument("--list", action="store_true", help="list configs") - p.add_argument("--jobs", type=int, default=2, - help="make -j per config (default: 2)") p.add_argument("--threads", type=int, default=nproc(), help="worker threads; each takes the next pending config " "when it is free (default: nproc)") diff --git a/.github/workflows/os-check.yml b/.github/workflows/os-check.yml index 5efd8954d0..0e4b9a01b8 100644 --- a/.github/workflows/os-check.yml +++ b/.github/workflows/os-check.yml @@ -478,7 +478,7 @@ jobs: ] EOF .github/scripts/parallel-make-check.py \ - --threads 1 --jobs 3 --cc= \ + --threads 1 --cc= \ --cflags='-pedantic -Wdeclaration-after-statement -Wnull-dereference -Wno-overlength-strings -DTEST_LIBWOLFSSL_SOURCES_INCLUSION_SEQUENCE' \ --private-dir=certs "$RUNNER_TEMP/os-check-macos-configs.json"