linux/tools/docs
Mauro Carvalho Chehab 08e14bc17e tools/docs: sphinx-build-wrapper: allow building PDF files in parallel
Use POSIX jobserver when available or -j<number> to run PDF
builds in parallel, restoring pdf build performance. Yet,
running it when debugging troubles is a bad idea, so, when
calling directly via command line, except if "-j" is splicitly
requested, it will serialize the build.

With such change, a PDF doc builds now takes around 5 minutes
on a Ryzen 9 machine with 32 cpu threads:

	# Explicitly paralelize both Sphinx and LaTeX pdf builds
	$ make cleandocs; time scripts/sphinx-build-wrapper pdfdocs -j 33

	real	5m17.901s
	user	15m1.499s
	sys	2m31.482s

	# Use POSIX jobserver to paralelize both sphinx-build and LaTeX
	$ make cleandocs; time make pdfdocs

	real	5m22.369s
	user	15m9.076s
	sys	2m31.419s

	# Serializes PDF build, while keeping Sphinx parallelized.
	# it is equivalent of passing -jauto via command line
	$ make cleandocs; time scripts/sphinx-build-wrapper pdfdocs

	real	11m20.901s
	user	13m2.910s
	sys	1m44.553s

Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Message-ID: <42eef319f9af6f9feb12bcd74ca6392c8119929d.1758196090.git.mchehab+huawei@kernel.org>
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
2025-09-18 11:18:39 -06:00
..
lib tools/docs: python_version: move version check from sphinx-pre-install 2025-09-18 11:17:19 -06:00
check-variable-fonts.py check-variable-fonts.py: add a helper to display instructions 2025-09-18 11:17:18 -06:00
gen-redirects.py docs: add tools/docs/gen-redirects.py 2025-09-09 13:37:16 -06:00
gen-renames.py docs: add tools/docs/gen-renames.py 2025-09-09 13:37:16 -06:00
parse-headers.py
sphinx-build-wrapper tools/docs: sphinx-build-wrapper: allow building PDF files in parallel 2025-09-18 11:18:39 -06:00
sphinx-pre-install tools/docs: python_version: move version check from sphinx-pre-install 2025-09-18 11:17:19 -06:00