From: "Daniel P. Berrangé" <berrange@redhat.com>
To: Thomas Huth <thuth@redhat.com>
Cc: "Fabiano Rosas" <farosas@suse.de>,
qemu-devel@nongnu.org, "Paolo Bonzini" <pbonzini@redhat.com>,
"Marc-André Lureau" <marcandre.lureau@redhat.com>,
"Peter Maydell" <peter.maydell@linaro.org>
Subject: Re: [PATCH] meson: Pass -j option to sphinx
Date: Thu, 27 Apr 2023 13:29:09 +0100 [thread overview]
Message-ID: <ZEpqlegE9XG/n19Z@redhat.com> (raw)
In-Reply-To: <6b0da42b-1588-e3ee-6868-0592784f9483@redhat.com>
On Thu, Apr 27, 2023 at 02:24:59PM +0200, Thomas Huth wrote:
> On 26/04/2023 18.03, Fabiano Rosas wrote:
> > Save a bit of build time by passing the number of jobs option to
> > sphinx.
> >
> > To avoid warnings from sphinx, alter our plugins to inform whether
> > they support parallelism. The two plugins touched are quite simple and
> > I don't see anything that would indicate they do not support being
> > called in parallel, so return True for both reads and writes.
> >
> > before:
> > $ time make -j16 man html
> > ...
> > [1/2] Generating docs/QEMU manual with a custom command
> > [2/2] Generating docs/QEMU man pages with a custom command
> >
> > real 0m49.770s
> > user 0m49.425s
> > sys 0m0.716s
> >
> > after:
> > $ time make -j16 man html
> > ...
> > [1/2] Generating docs/QEMU manual with a custom command (wrapped by meson because command contains newlines)
> > [2/2] Generating docs/QEMU man pages with a custom command (wrapped by meson because command contains newlines)
> > real 0m30.153s
> > user 1m5.945s
> > sys 0m2.440s
> >
> > Signed-off-by: Fabiano Rosas <farosas@suse.de>
> > ---
> > docs/meson.build | 12 ++++++++++++
> > docs/sphinx/fakedbusdoc.py | 5 +++++
> > docs/sphinx/qmp_lexer.py | 5 +++++
> > 3 files changed, 22 insertions(+)
> >
> > diff --git a/docs/meson.build b/docs/meson.build
> > index f220800e3e..9e4bed6fa0 100644
> > --- a/docs/meson.build
> > +++ b/docs/meson.build
> > @@ -10,6 +10,18 @@ if sphinx_build.found()
> > SPHINX_ARGS += [ '-W', '-Dkerneldoc_werror=1' ]
> > endif
> > + sphinx_version = run_command(SPHINX_ARGS + ['--version'],
> > + check: false).stdout().split()[1]
> > + if sphinx_version.version_compare('>=5.1.2')
> > + SPHINX_ARGS += ['-j', 'auto']
> > + else
> > + nproc = find_program('nproc')
> > + if nproc.found()
> > + jobs = run_command(nproc, check:false).stdout()
> > + SPHINX_ARGS += ['-j', jobs]
> > + endif
> > + endif
>
> Wouldn't it be better to use the value from "make -jXX" instead of always
> running with the maximum number of processors here?
IIUC, this is not exposed by meson.
With regards,
Daniel
--
|: https://berrange.com -o- https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org -o- https://fstop138.berrange.com :|
|: https://entangle-photo.org -o- https://www.instagram.com/dberrange :|
prev parent reply other threads:[~2023-04-27 12:29 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-04-26 16:03 [PATCH] meson: Pass -j option to sphinx Fabiano Rosas
2023-04-27 11:58 ` Daniel P. Berrangé
2023-04-27 13:12 ` Fabiano Rosas
2023-04-27 12:24 ` Thomas Huth
2023-04-27 12:29 ` Daniel P. Berrangé [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=ZEpqlegE9XG/n19Z@redhat.com \
--to=berrange@redhat.com \
--cc=farosas@suse.de \
--cc=marcandre.lureau@redhat.com \
--cc=pbonzini@redhat.com \
--cc=peter.maydell@linaro.org \
--cc=qemu-devel@nongnu.org \
--cc=thuth@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).