Re: [PATCH v2] Documentation: Document each netlink family

From: Jonathan Corbet
Date: Fri Nov 17 2023 - 17:17:17 EST


Breno Leitao <leitao@xxxxxxxxxx> writes:

> This is a simple script that parses the Netlink YAML spec files
> (Documentation/netlink/specs/), and generates RST files to be rendered
> in the Network -> Netlink Specification documentation page.
>
> Create a python script that is invoked during 'make htmldocs', reads the
> YAML specs located under Documentation/netlink/specs, parses one by one
> and generates a correspondent RST file for each YAML file.
>
> Create a new Documentation/networking/netlink_spec index page, and
> reference each Netlink RST file that was processed above in this main
> index.rst file.
>
> In case of any exception during the parsing, dump the error and skip
> the file.
>
> Suggested-by: Jakub Kicinski <kuba@xxxxxxxxxx>
> Signed-off-by: Breno Leitao <leitao@xxxxxxxxxx>

In principle I like this approach better. There is one problem, though:

- In current kernels, on my machine, "make htmldocs" when nothing has
changed takes about 6s to complete.

- With this patch applied, it takes a little over 5 *minutes*.

Without having delved into it too far, I am guessing that the
unconditional recreation of the netlink RST files is causing the rebuild
of much of the documentation. Even so, I don't quite get it.

That, clearly, would need to be fixed before this can go in.

Thanks,

jon