From: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
To: Jonathan Corbet <corbet@lwn.net>
Cc: Laurent Pinchart <laurent.pinchart@ideasonboard.com>,
Vegard Nossum <vegard.nossum@oracle.com>,
ksummit@lists.linux.dev,
Linux Documentation <linux-doc@vger.kernel.org>,
Mauro Carvalho Chehab <mchehab@kernel.org>,
Akira Yokosawa <akiyks@gmail.com>,
Bagas Sanjaya <bagasdotme@gmail.com>,
Jani Nikula <jani.nikula@intel.com>,
Randy Dunlap <rdunlap@infradead.org>
Subject: Re: [TECH TOPIC] Kernel documentation - update and future directions
Date: Sun, 31 Aug 2025 16:03:39 +0200 [thread overview]
Message-ID: <20250831160339.2c45506c@foz.lan> (raw)
In-Reply-To: <87h5xo1k6y.fsf@trenco.lwn.net>
Em Sat, 30 Aug 2025 17:08:53 -0600
Jonathan Corbet <corbet@lwn.net> escreveu:
> Laurent Pinchart <laurent.pinchart@ideasonboard.com> writes:
>
> >> > Last year we tried an experiment with a bit of funding from the LF to
> >> > create a bit of paid documentation; for a number of reasons, that
> >> > experiment did not work out. But it seems there should be a way to make
> >> > some forward progress on this front.
> >
> > Is there anything we can learn from that failure and that number of
> > reasons to make the next attempt more successful ?
>
> I think that the experiment didn't work for a couple of reasons:
>
> - The topic area that we settled upon was a relatively advanced one, we
> really should have started with something simpler.
>
> - The writer who was assigned was not really up to the task; I found
> myself repeatedly having to explain basic aspects of the C programming
> language, for example. That made it almost impossible to get a
> satisfactory document out of the process, made worse by the first
> reason listed above.
The way I see, there are several orthogonal tasks.
1) Book set organization
The first one would almost certainly require LF or someone else sponsor
a person with lots of experience on organizing and reviewing technical
books that worked on similar projects.
Such person would be starting from top to down, organizing the books
on a way that the basic knowledge would be covered at the first chapters,
and more advanced items at the end, and missing chapters will contain
skeleton ReST files on it to be filled by someone else. After having
it, review the text, specially for the less technical chapters, to
ensure that it is accessible to kernel newbies.
2) uAPI documentation
This requires highly skilled people or advanced userspace developers,
and should be done subsystem by subsystem.
We did that on media several years ago, and, although not perfect,
I do think that we cover almost everything for uAPI, with examples,
tables images etc.
From my experience, uAPI is easier to document than kAPI, as it doesn't
change that much (not counting sysfs/debugfs/configfs).
On media, we started enforcing documentation for all new media uAPI.
We then reviewed the gaps and filled in the blanks.
3) ABI documentation: sysfs, configfs, debugfs
Such ABIs are a different best: we have dozens of thousands of sysfs symbols
on a server. Last time I checked, most undocumented.
I wrote a function at get_abi tool to help finding the gaps: it can help
identifying missing gaps by converting ABI descriptions into regular
expressions and check against the real sysfs nodes found at the system(*).
I'd say that someone without intermediate C knowledge can probably use it
to produce a lot of missing ABI documentation.
(*) The tool itself can easily be modified to also handle debugfs/configfs,
but there are too many gaps at sysfs. I would start with them.
4) kernel-doc kAPI
It shouldn't be that hard to do the same for kernel-doc kAPI documentation:
kernel-doc now can parse the entire tree with:
$ scripts/kernel-doc .
Someone can easily use it to discover the current gaps at the docs that
have already some kernel-doc markups and identify what of them aren't
yet placed under Documentation/ ".. kernel-doc::" markups.
So, I'd say the first step here would be to ensure that 100% of the
docs are there somewhere. Alternatively, we could place all the rest
of functions with kernel-doc markups outside Documentation inside an
"others/" book - or even "<subsystem>/others/", and then gradually move
them to the right places.
5) kAPI itself
Except for trivial cases, I don't think that only kernel-doc is
enough. On most of the cases, a document describing the main
concepts and the design behind the kAPI is needed. Almost certainly
only core developers and maintainers within each subsystem can
write those.
> What it comes down to, perhaps, is the same old problem: the people who
> understand the problem domain well enough to document it can generally
> make a more comfortable living creating more undocumented code instead.
True, but I guess this is valid mostly for (5).
Thanks,
Mauro
next prev parent reply other threads:[~2025-08-31 14:03 UTC|newest]
Thread overview: 58+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <87plcndkzs.fsf@trenco.lwn.net>
[not found] ` <20250828230104.GB26612@pendragon.ideasonboard.com>
[not found] ` <87wm6l0w2y.fsf@trenco.lwn.net>
2025-08-30 16:00 ` [TECH TOPIC] Kernel documentation - update and future directions Vegard Nossum
2025-08-30 22:23 ` Laurent Pinchart
2025-08-30 23:08 ` Jonathan Corbet
2025-08-31 14:03 ` Mauro Carvalho Chehab [this message]
2025-08-31 20:16 ` Jonathan Corbet
2025-09-01 6:17 ` Randy Dunlap
2025-09-01 19:27 ` Mauro Carvalho Chehab
2025-09-01 10:09 ` Jani Nikula
2025-09-01 16:51 ` Randy Dunlap
2025-09-01 17:52 ` Mark Brown
2025-09-01 18:15 ` Randy Dunlap
2025-09-01 18:20 ` Mark Brown
2025-09-01 18:25 ` Jonathan Corbet
2025-09-01 18:40 ` Mark Brown
2025-09-01 19:51 ` Jonathan Corbet
2025-09-01 22:52 ` Mauro Carvalho Chehab
2025-09-01 18:46 ` Mauro Carvalho Chehab
2025-09-01 18:52 ` Mark Brown
2025-09-01 22:56 ` Mauro Carvalho Chehab
2025-09-02 11:15 ` Mark Brown
2025-09-02 11:59 ` Mauro Carvalho Chehab
2025-09-02 12:14 ` Mauro Carvalho Chehab
2025-09-02 13:00 ` Mark Brown
2025-09-02 14:42 ` Mauro Carvalho Chehab
2025-09-02 15:15 ` Jonathan Corbet
2025-09-02 17:19 ` Mauro Carvalho Chehab
2025-09-02 18:52 ` Laurent Pinchart
2025-09-03 7:47 ` Jani Nikula
2025-09-03 10:04 ` Mauro Carvalho Chehab
2025-09-03 10:25 ` Jani Nikula
2025-09-02 18:58 ` Jonathan Corbet
2025-09-02 22:35 ` Mauro Carvalho Chehab
2025-09-03 6:29 ` Johannes Berg
2025-09-03 10:42 ` Mauro Carvalho Chehab
2025-09-03 10:45 ` Johannes Berg
2025-09-03 10:54 ` Johannes Berg
2025-09-03 14:57 ` Mauro Carvalho Chehab
2025-09-03 15:07 ` Laurent Pinchart
2025-09-03 15:17 ` Konstantin Ryabitsev
2025-09-03 15:22 ` Miguel Ojeda
2025-09-03 15:11 ` Johannes Berg
2025-09-03 15:25 ` Mauro Carvalho Chehab
2025-09-03 15:37 ` Jonathan Corbet
2025-09-03 15:52 ` Mauro Carvalho Chehab
2025-09-03 13:39 ` Mauro Carvalho Chehab
2025-09-03 13:51 ` Laurent Pinchart
2025-09-01 19:53 ` Jonathan Corbet
2025-09-01 23:15 ` Mauro Carvalho Chehab
2025-09-01 18:37 ` Mauro Carvalho Chehab
2025-09-01 19:05 ` Andrew Lunn
2025-09-01 19:17 ` Mark Brown
2025-09-02 10:42 ` Jani Nikula
2025-09-02 11:55 ` Mauro Carvalho Chehab
2025-09-02 12:07 ` Jani Nikula
2025-09-02 15:07 ` Mauro Carvalho Chehab
2025-09-01 18:26 ` Mauro Carvalho Chehab
2025-09-02 10:55 ` Jani Nikula
2025-09-02 12:04 ` Andrew Lunn
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=20250831160339.2c45506c@foz.lan \
--to=mchehab+huawei@kernel.org \
--cc=akiyks@gmail.com \
--cc=bagasdotme@gmail.com \
--cc=corbet@lwn.net \
--cc=jani.nikula@intel.com \
--cc=ksummit@lists.linux.dev \
--cc=laurent.pinchart@ideasonboard.com \
--cc=linux-doc@vger.kernel.org \
--cc=mchehab@kernel.org \
--cc=rdunlap@infradead.org \
--cc=vegard.nossum@oracle.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).