From eaf66a23d013a7669c5a9848550af9a9278ca30a Mon Sep 17 00:00:00 2001 From: Tomi Ollila Date: Sun, 4 Jan 2026 23:16:10 +0200 Subject: [PATCH] scripts/check: run checkpatch.pl processes with max 16 args each Reduce the overhead of fork/execve/perl startup time by not doing those for every files that are checked. This also makes the check execution complete faster. On similar systems and similar background load, the execution time varies based on how find(1) outputs the (*.[ch]) files it sees on filesystem -- the filenames are not sorted but are written from directories src/ include/ clients/ t/ in that order -- more than 80% of the time goes checking files in src/, and how the 16-file batches from that dir (108 files in src/, 208 total, as of 2026-01) are distributed the checkpatch.pl processes affect mostly to the total run time. --- scripts/check | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/check b/scripts/check index 473fcfdc..5de6377f 100755 --- a/scripts/check +++ b/scripts/check @@ -20,7 +20,7 @@ run_checks () { fi find src/ include/ clients/ t/ \( -name "*.c" -o -name "*.h" \) -type f -print0 | - nice xargs -0 --max-args 1 --max-procs $(nproc) \ + nice xargs -0 --max-args 16 --max-procs $(nproc) \ scripts/checkpatch.pl --terse --no-tree --strict --file return $? }