Skip to content

v1.0.36

@dashersw dashersw tagged this 18 Oct 07:59
Spectral-norm stopped scaling past 8 threads on a 20-thread Ryzen under WSL.
Its forty short maps each built 1024 per-leaf arrays that the joining thread
concatenated alone; that serial gap outlasted the workers' 100 us spin, so the
helpers parked between maps and every map paid futex wakes (0.12-0.24 s of
kernel time where Rayon had none; user cycles were equal).

gea::parallel::tabulate(length, body) returns the array whose element i is
body(i): sized once before the region, each task storing its own contiguous
run. @geastack/parallel 1.0.2 builds map on it and registers it as a parallel
region entry, so its body is certified exactly as a tasks body is; the stores
are the runtime's and disjoint by construction. At 20 threads, interleaved
with Rayon in one session, spectral-norm now runs 10.0-13.6 ms against
Rayon's 13.4-16.2 and the C++ pool's 10.7-13.1.

Negative results, not to retry: a longer wait before parking. While the
serial gap existed, a 2 ms busy spin helped (29.9 -> 21.4 ms); with tabulate
it is far worse (14-93 ms), and a 100 us spin followed by 2 ms of sched_yield
is worse too (10-20 ms, mostly ~18): idle workers holding vCPUs delay the
threads that still have work. The spin policy is unchanged. Fewer leaves per
region (40-256) changed nothing.

release:check on WSL (4807 s): 256 of 258 commands passed. The perf gate
found 0 GeaStack regressions and every claim held (parallel geometric mean
at 20 threads +20.0% over Rayon, +14.7% over the C++ pool; spectral-norm
9.4 ms against Rayon's 12.7), but one control drifted from the baseline, so
it exits inconclusive. The other failure was core's weak-symbol test, stale
since core 73efb87; fixed in core 81ba975.
Assets 2
Loading