From: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
To: Jonathan Corbet <corbet@lwn.net>
Cc: Albert Ou <aou@eecs.berkeley.edu>,
Mauro Carvalho Chehab <mchehab@kernel.org>,
Palmer Dabbelt <palmer@dabbelt.com>,
Paul Walmsley <pjw@kernel.org>,
linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org,
linux-riscv@lists.infradead.org, workflows@vger.kernel.org,
Alexandre Ghiti <alex@ghiti.fr>,
Shuah Khan <skhan@linuxfoundation.org>,
Randy Dunlap <rdunlap@infradead.org>,
Dan Williams <djbw@kernel.org>
Subject: Re: [PATCH v4 00/10] Auto-generate maintainer profile entries
Date: Mon, 4 May 2026 09:00:41 +0200 [thread overview]
Message-ID: <20260504090041.243520a8@foz.lan> (raw)
In-Reply-To: <87lde0bii2.fsf@trenco.lwn.net>
On Sun, 03 May 2026 09:49:41 -0600
Jonathan Corbet <corbet@lwn.net> wrote:
> Mauro Carvalho Chehab <mchehab+huawei@kernel.org> writes:
>
> > Hi Jon,
> >
> > This is basically the same patch series I sent during the merge
> > window, rebased on the top of post 7.1-rc1 docs-next branch.
> > It is tested both with and without O=DOCS.
> >
> > It contains just one extra trivial patch adding a missing SPDX
> > header, and, on v4, I dropped two patches touching MAINTAINERS,
> > as those aren't needed anymore.
> >
> > This patch series change the way maintainer entry profile links
> > are added to the documentation. Instead of having an entry for
> > each of them at an ReST file, get them from MAINTAINERS content.
> >
> > That should likely make easier to maintain, as there will be a single
> > point to place all such profiles.
> >
> > The output is a per-subsystem sorted (*) series of links shown as a
> > list like this:
> >
> > - Arm And Arm64 Soc Sub-Architectures (Common Parts)
> > - Arm/Samsung S3C, S5P And Exynos Arm Architectures
> > - Arm/Tesla Fsd Soc Support
> > ...
> > - Xfs Filesystem
> >
> > Please notice that the series is doing one logical change per patch.
> > I could have merged some changes altogether, but I opted doing it
> > in small steps to help reviews. If you prefer, feel free to merge
> > maintainers_include changes on merge.
> >
> > There is one interesting side effect of this series: there is no
> > need to add rst files containing profiles inside a TOC tree: Just
> > creating the file anywhere inside Documentation and adding a P entry
> > is enough. Adding them to a TOC won't hurt.
>
> One thing I kind of dislike about these magic mechanisms is that we end
> up with a single, essentially unsorted list of stuff that readers have
> to go digging their way through. It would be nice if we could somehow
> apply a bit of structure; as the number of these handbooks grows, our
> readers would appreciate it.
The output is sorted by subsystem's name:
for profile, entry in sorted(maint.profile_entries.items()):
if entry.startswith("http"):
output += f"- `{profile} <{entry}>`_\n"
else:
output += f"- :doc:`{profile} <{entry}>`\n"
But yeah, as this grows, We can apply some struct there later on.
I expect that this would be good enough for "P" entries: as such entries
are used only by the biggest subsystems, I won't expect that the profiles
list would be too big.
If I'm wrong, though, changing its output is easy, as all the parsing
were done in separate: all we have to do would be to change this part.
-
Now, for the full MAINTAINERS content, I agree with you. I have
a patch series here which splits the parsing from the output,
which allows placing its contents inside a table and with a
filter javascript [1]. On my view, the output is a lot more
interesting for readers this way [2].
> Oh well, one can always hope. Meanwhile, this seems useful, I've
> applied it.
Thanks!
---
[1] On such series, I'm creating a table with two rows:
output += ".. _maintainers_table:\n\n"
output += ".. flat-table::\n"
output += " :header-rows: 1\n\n"
output += " * - Subsystem\n"
output += " - Properties\n\n"
self.state.document['maintainers_included'] = True
for name, fields in maint_parser.maint_entries.items():
output += f" * - {name}\n"
tag = "-"
for field, lines in fields.items():
field_name = maint_parser.fields.get(field, field)
output += f" {tag} :{field_name}:\n "
output += ",\n ".join(lines) + "\n"
tag = " "
output += "\n"
Which is a lot easier to read than the current output, and adding
a small javascript that allows filtering entries, based at the
contents of either subsystem or properties. That should help
readers to seek for things they're interested.
I considered ordering it by subsystems, and did some tests with that,
but at the final version I ended removing.
The main issue is that MAINTAINERS entries aren't grouped by
subsystems. Also, we don't have any field to identify to what
subsystem each entry belongs.
Using the mailing list field helps to have something close enough,
while being fast. Even so, some caveats are needed, as:
1) several entries contain multiple ML entries, which may include:
- subsystem ML;
- LKML;
- driver-specific ML;
- vendor-specific ML.
2) several entries have only LKML.
For the purpose of grouping such entries, even after filtering out LKML,
due to (1), hints are needed to try to pick subsystem ML. Perhaps the
best hint is to check if the entry is @kernel.org, which works reasonably
well. Yet, not all subsystems have its ML there.
I also considered sorting them by the number of files, using iglob
to calculate it. That would help to place the subsystem first, followed
by subsystem drivers, and this is fast enough with my nvme disks but
this could slow kernel builds on mechanical HDs.
So, I suspect that, if we want to have something more structured,
the first step would be to do some rework at the MAINTAINERS file.
[2] I need some time to check if are there any regressions
on the patch that splits the logic.
Regards,
Mauro
next prev parent reply other threads:[~2026-05-04 7:00 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-04-27 14:22 [PATCH v4 00/10] Auto-generate maintainer profile entries Mauro Carvalho Chehab
2026-04-27 14:22 ` [PATCH v4 01/10] docs: maintainers: add SPDX license to the file Mauro Carvalho Chehab
2026-04-27 14:22 ` [PATCH v4 02/10] docs: maintainers_include: auto-generate maintainer profile TOC Mauro Carvalho Chehab
2026-04-27 14:22 ` [PATCH v4 03/10] docs: auto-generate maintainer entry profile links Mauro Carvalho Chehab
2026-04-27 14:22 ` [PATCH v4 04/10] docs: maintainers_include: use a better title for profiles Mauro Carvalho Chehab
2026-04-27 14:22 ` [PATCH v4 05/10] docs: maintainers_include: add external profile URLs Mauro Carvalho Chehab
2026-04-27 14:22 ` [PATCH v4 06/10] docs: maintainers_include: preserve names for files under process/ Mauro Carvalho Chehab
2026-04-27 14:22 ` [PATCH v4 07/10] docs: maintainers_include: Only show main entry for profiles Mauro Carvalho Chehab
2026-04-27 14:22 ` [PATCH v4 08/10] docs: maintainers_include: improve its output Mauro Carvalho Chehab
2026-04-27 14:22 ` [PATCH v4 09/10] docs: maintainers_include: fix support for O=dir Mauro Carvalho Chehab
2026-04-27 14:22 ` [PATCH v4 10/10] docs: maintainers_include: parse MAINTAINERS just once Mauro Carvalho Chehab
2026-05-03 15:49 ` [PATCH v4 00/10] Auto-generate maintainer profile entries Jonathan Corbet
2026-05-04 7:00 ` Mauro Carvalho Chehab [this message]
2026-05-04 14:39 ` 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=20260504090041.243520a8@foz.lan \
--to=mchehab+huawei@kernel.org \
--cc=alex@ghiti.fr \
--cc=aou@eecs.berkeley.edu \
--cc=corbet@lwn.net \
--cc=djbw@kernel.org \
--cc=linux-doc@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-riscv@lists.infradead.org \
--cc=mchehab@kernel.org \
--cc=palmer@dabbelt.com \
--cc=pjw@kernel.org \
--cc=rdunlap@infradead.org \
--cc=skhan@linuxfoundation.org \
--cc=workflows@vger.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