From: "Nícolas F. R. A. Prado" <nfraprado@collabora.com>
To: Jonathan Corbet <corbet@lwn.net>
Cc: Masahiro Yamada <masahiroy@kernel.org>,
Nathan Chancellor <nathan@kernel.org>,
Nicolas Schier <nicolas.schier@linux.dev>,
kernel@collabora.com, linux-doc@vger.kernel.org,
linux-kernel@vger.kernel.org, linux-kbuild@vger.kernel.org,
Mauro Carvalho Chehab <mchehab@kernel.org>
Subject: Re: [PATCH RFC 0/2] Add Kconfig pages and cross-references to Documentation
Date: Fri, 4 Apr 2025 12:24:27 -0400 [thread overview]
Message-ID: <6b019d76-1a8f-4e8d-8b9b-05094a014689@notapiano> (raw)
In-Reply-To: <8734eogfqw.fsf@trenco.lwn.net>
On Fri, Apr 04, 2025 at 08:31:35AM -0600, Jonathan Corbet wrote:
> Nícolas F. R. A. Prado <nfraprado@collabora.com> writes:
>
> > This series adds Kconfig pages (patch 1) to the Documentation, and
> > automarkups CONFIG_* text as cross-references to those pages (patch 2).
> >
> > There is a huge change in build time with this series, so we'd either
> > have to so some optimization and/or put this behind a flag in make so it
> > is only generated when desired (for instance for the online
> > documentation):
> >
> > (On an XPS 13 9300)
> >
> > Before:
> >
> > real 6m43.576s
> > user 23m32.611s
> > sys 1m48.220s
> >
> > After:
> >
> > real 11m56.845s
> > user 47m40.528s
> > sys 2m27.382s
> >
> > There are also some issues that were solved in ad-hoc ways (eg the
> > sphinx warnings due to repeated Kconfigs, by embedding the list of
> > repeated configs in the script). Hence the RFC.
>
> I'm still digging out from LSFMM, so have only glanced at this ... I can
> see the appeal of doing this, but nearly doubling the docs build time
> really isn't going to fly. Have you looked to see what is taking all of
> that time? The idea that it takes as long to process KConfig entries as
> it does to build the entire rest of the docs seems ... a bit wrong.
I have not yet. Thought I'd get some feedback before looking into the
performance. But I agree with the sentiment.
>
> I wonder what it would take to create a Sphinx extension that would
> simply walk the source tree and slurp up the KConfig entries directly?
> That would be nicer than adding a separate script in any case.
That is what is currently done for the ABI, AFAIK, so definitely seems doable.
The key difference between the ABI approach and this here, is that my goal was
to reflect the Kconfig file hierarchy in the Documentation. So each Kconfig
file gets its own documentation page, while the ABI approach collects the
contents of all ABI files into just a few documentation pages (stable, testing,
etc). (So there's a non-constant number of .rst files, which means they have to
be generated and can't be a sphinx plugin in this approach).
I went for this approach because the filesystem hierarchy seemed the most
logical way to group the Kconfig symbols. Also Kconfig files have directives like
'menu' that should be present in the documentation in the same order they appear
in the file to fully describe dependencies of the symbols, and having all of
that in the same page seems like it would be confusing. But given the potential
benefits it's worth a try for sure.
Now that I think about it, seems quite likely that a lot of the time spent comes
from creating a subshell and running the script for every Kconfig file. So
making a single script or sphinx extension that itself handles iterating over
all the files would likely greatly reduce the run time. I'll test that.
Thanks,
Nícolas
>
> I'll try to look closer, but I'll remain a bit distracted for a little
> while yet.
>
> Thanks,
>
> jon
next prev parent reply other threads:[~2025-04-04 16:24 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-04-04 14:02 Nícolas F. R. A. Prado
2025-04-04 14:02 ` [PATCH RFC 1/2] docs: Add documentation generation for Kconfig symbols Nícolas F. R. A. Prado
2025-04-07 2:47 ` Mauro Carvalho Chehab
2025-04-04 14:02 ` [PATCH RFC 2/2] docs: automarkup: Cross-reference CONFIG_ symbols Nícolas F. R. A. Prado
2025-04-04 14:31 ` [PATCH RFC 0/2] Add Kconfig pages and cross-references to Documentation Jonathan Corbet
2025-04-04 16:24 ` Nícolas F. R. A. Prado [this message]
2025-04-07 3:06 ` Mauro Carvalho Chehab
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=6b019d76-1a8f-4e8d-8b9b-05094a014689@notapiano \
--to=nfraprado@collabora.com \
--cc=corbet@lwn.net \
--cc=kernel@collabora.com \
--cc=linux-doc@vger.kernel.org \
--cc=linux-kbuild@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=masahiroy@kernel.org \
--cc=mchehab@kernel.org \
--cc=nathan@kernel.org \
--cc=nicolas.schier@linux.dev \
/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
all inboxes | Powered by JetHome®