From: Akira Yokosawa <akiyks@gmail.com>
To: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>,
Linux Doc Mailing List <linux-doc@vger.kernel.org>,
Jonathan Corbet <corbet@lwn.net>
Cc: linux-kernel@vger.kernel.org, Akira Yokosawa <akiyks@gmail.com>
Subject: Re: [PATCH v2] sphinx: kernel_abi: fix performance regression with O=<dir>
Date: Fri, 18 Jul 2025 09:50:55 +0900 [thread overview]
Message-ID: <da247b68-12aa-43ed-83f4-65503bf90c74@gmail.com> (raw)
In-Reply-To: <e25673d87357457bc54ee863e97ff8f75956580d.1752752211.git.mchehab+huawei@kernel.org>
On Thu, 17 Jul 2025 13:37:19 +0200, Mauro Carvalho Chehab wrote:
> The logic there which adds a dependency note to Sphinx cache
> is not taking into account that the build dir may not be
> the source dir. This causes a performance regression:
>
> $ time make O=/tmp/foo SPHINXDIRS=admin-guide htmldocs
>
> [OUTDATED]
> Added: set()
> Changed: {'abi-obsolete', 'abi-removed', 'abi-stable-files', 'abi-obsolete-files', 'abi-stable', 'abi', 'abi-removed-files', 'abi-testing-files', 'abi-testing', 'gpio/index', 'gpio/obsolete'}
> Removed: set()
> All docs count: 385
> Found docs count: 385
>
> real 0m11,324s
> user 0m15,783s
> sys 0m1,164s
>
> To get the root cause of the problem (ABI files reported as changed),
> I used this changeset:
>
> diff --git a/Documentation/conf.py b/Documentation/conf.py
> index e8766e689c1b..ab486623bd8b 100644
> --- a/Documentation/conf.py
> +++ b/Documentation/conf.py
> @@ -571,3 +571,16 @@ def setup(app):
> """Patterns need to be updated at init time on older Sphinx versions"""
>
> app.connect('config-inited', update_patterns)
> + app.connect('env-get-outdated', on_outdated)
> +
> +def on_outdated(app, env, added, changed, removed):
> + """Track cache outdated due to added/changed/removed files"""
> + print("\n[OUTDATED]")
> + print(f"Added: {added}")
> + print(f"Changed: {changed}")
> + print(f"Removed: {removed}")
> + print(f"All docs count: {len(env.all_docs)}")
> + print(f"Found docs count: {len(env.found_docs)}")
> +
> + # Just return what we have
> + return added | changed | removed
>
> Reported-by: Akira Yokosawa <akiyks@gmail.com>
> Closes: https://lore.kernel.org/linux-doc/c174f7c5-ec21-4eae-b1c3-f643cca90d9d@gmail.com/
> Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Tested-by: Akira Yokosawa <akiyks@gmail.com>
Thanks!
> ---
> v2: updated description. No changes at the diff itself
>
[...]
next prev parent reply other threads:[~2025-07-18 0:51 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-07-17 11:37 Mauro Carvalho Chehab
2025-07-18 0:50 ` Akira Yokosawa [this message]
2025-07-24 14:40 ` Jonathan Corbet
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=da247b68-12aa-43ed-83f4-65503bf90c74@gmail.com \
--to=akiyks@gmail.com \
--cc=corbet@lwn.net \
--cc=linux-doc@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mchehab+huawei@kernel.org \
/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®