News: 0001491976

  ARM Give a man a fire and he's warm for a day, but set fire to him and he's warm for the rest of his life (Terry Pratchett, Jingo)

Idea Raised For Reducing The Size Of The AMDGPU Driver With Its Massive Header Files

([Radeon] 30 Minutes Ago Moving To External Repo)


Following the weekend news of [1]the AMDGPU kernel driver becoming too large that it's causing the Plymouth boot splash screen on slower Linux systems to time-out, longtime AMD Linux graphics driver engineer Marek Olšák expressed a new idea for helping to reduce some bloat from this AMD kernel graphics driver.

Much of [2]the nearly six million lines of code making up the AMDGPU driver are auto-generated header files for each supported GPU. Most of them are unused by the driver itself and serve as a sort of living documentation around the GPUs with AMD focusing less in recent years on putting out hardware documentation publicly and focusing more on just enhancing the AMD open-source graphics driver.

Marek's proposed solution is rather straight-forward: move all the AMDGPU GPU header files out into its own separate dedicated repository. The AMDGPU driver can pull in just the header files actually needed and used by the driver. Other user-space software depending upon the header files like Mesa and the UMR debugger can fetch from that dedicated repository rather than from within the kernel source tree.

Marek also proposes a Python script that could trim all the header files and only keeping around the definitions actually used by the AMDGPU driver source code.

[3]

Marek notes in the [4]AMD issue tracker that the size of the AMDGPU driver include directory for header files is roughly 32.7% the entire size of the Linux kernel source Git tree... And he warns that it's not going to stop growing with AMD continuing to work on new GPU support. Marek estimates that around 98% of the ASIC headers could be removed from the kernel source tree with his approach.

AMD Linux engineer Mario Limonciello also added on the FreeDesktop.org thread that the x86 CPUID expected output data documentation is going through a similar transition of moving to an external centralized database and then will periodically sync with the kernel source tree.

We'll see if this idea gains any traction for coming up with a dedicated, official repository where AMD graphics GPU/ASIC header files will live outside of the kernel tree and then trimming the fat within the AMDGPU kernel driver source folder.



[1] https://www.phoronix.com/news/AMDGPU-Driver-Plymouth-Woes

[2] https://www.phoronix.com/news/AMD-Kernel-GPU-5.8-Million

[3] https://www.phoronix.com/image-viewer.php?id=2024&image=radeon_bloat_lrg

[4] https://gitlab.freedesktop.org/drm/amd/-/issues/3636



oleid

This life is a test. It is only a test. Had this been an actual life, you
would have received further instructions as to what to do and where to go.