Originally posted by ahrs
View Post
Announcement
Collapse
No announcement yet.
Idea Raised For Reducing The Size Of The AMDGPU Driver With Its Massive Header Files
Collapse
X
-
Originally posted by WileEPyote View Post
I prefer my lines of scrolling text. It feels all technical and Matrix-y.
This is a Gentoo system with the bare-minimum mind you. I think Udev and NetworkManager forms the bulk of time spent booting. Distributions like Ubuntu that do stupid things like mount a million squashfs mounts for Snap at boot are going to take longer, there's no way around that.
- Likes 1
Comment
-
Originally posted by ahrs View Post
Me too but I barely get to see them, even on my old dual-core laptop it boots so fast since I upgraded it with a Samsung SSD. Anyone still using a hard drive in 2024 has no excuse.
This is a Gentoo system with the bare-minimum mind you. I think Udev and NetworkManager forms the bulk of time spent booting. Distributions like Ubuntu that do stupid things like mount a million squashfs mounts for Snap at boot are going to take longer, there's no way around that.
- Likes 1
Comment
-
Originally posted by coder View PostI think some of what he was proposing to prune was the documentation they contain. If that's needed to figure out what the definitions mean and how to use them, then you'd want that information to be maintained somewhere. If just the needed definitions are in the kernel tree, then these should be derived from the full headers that should live elsewhere.
Originally posted by coder View PostThe headers are generated from their hardware design sources. They're not going to release those, and they'd bloat the tree way worse than the existing headers, if that did happen.
Originally posted by jsbiff View PostFrom my reading of the article, even though the headers aren't used by the driver, some of them are used by other projects, like Mesa. It sounds like if you delete them totally, you break Mesa and maybe some other stuff?
Comment
-
Just a reminder that there are two separate discussions going on - one is about header file size (which does not affect compiled driver size) and the other is about supporting ~14 years of hardware with a single (amdgpu) kernel driver, which makes the compiled driver larger. If we split the support across two or more driver (which would involve duplicating a bunch of code).
It's still not clear to us why amdgpu's compiled binary size is a problem if the much larger NVidia driver's size is not, but hopefully that will become more clear with time.
Separately I have seen a few comments about the code becoming too complex because of all the conditionals required to support many generations of hardware but that is not how amdgpu is implemented - we have a separate chunk of code for each HW block generation (or range of very similar generations), load up a pointer array during initialization based on the HW blocks in the GPU then call into the appropriate code at runtime via that pointer array.
For that matter it is also not clear why header file size is a problem other than maybe being aesthetically displeasing - the header text compresses very efficiently and is downloaded in compressed form, and uncompressed size on disk is tiny compared to the smallest SSDs available today.
That said, if we were to split amdgpu into two or more drivers the associated header files would automatically be split as well (I say "automatically" but it would be a bunch of developer work) but it would bring an ongoing burden of duplicating common code and bug fixes in that common code across the two drivers. We could split the code in three so we only have a single copy of common code but that would make partitioning the header files more difficult.
Not sure what the DRM maintainers (airlied, Daniel) would prefer but worth revisiting (it has been discussed before IIRC).Last edited by bridgman; 23 September 2024, 04:34 PM.Test signature
- Likes 1
Comment
-
-
Originally posted by bridgman View PostJust a reminder that there are two separate discussions going on - one is about header file size (which does not affect compiled driver size) and the other is about supporting ~14 years of hardware with a single (amdgpu) kernel driver, which makes the compiled driver larger. If we split the support across two or more driver (which would involve duplicating a bunch of code).
It's still not clear to us why amdgpu's compiled binary size is a problem if the much larger NVidia driver's size is not, but hopefully that will become more clear with time.
Separately I have seen a few comments about the code becoming too complex because of all the conditionals required to support many generations of hardware but that is not how amdgpu is implemented - we have a separate chunk of code for each HW block generation (or range of very similar generations), load up a pointer array during initialization based on the HW blocks in the GPU then call into the appropriate code at runtime via that pointer array.
For that matter it is also not clear why header file size is a problem other than maybe being aesthetically displeasing - the header text compresses very efficiently and is downloaded in compressed form, and uncompressed size on disk is tiny compared to the smallest SSDs available today.
That said, if we were to split amdgpu into two or more drivers the associated header files would automatically be split as well (I say "automatically" but it would be a bunch of developer work) but it would bring an ongoing burden of duplicating common code and bug fixes in that common code across the two drivers. We could split the code in three so we only have a single copy of common code but that would make partitioning the header files more difficult.
Not sure what the DRM maintainers (airlied, Daniel) would prefer but worth revisiting (it has been discussed before IIRC).
Comment
-
Originally posted by LtdJorge View Post
True, although on modern SSDs Plymouth actually slows down the boot process.
and the thing is already sitting on a ly login screen before the monitor can finish initializing. I don't use plymouth, just Ly for the display manager,
and sway for the desktop.
Comment
-
Originally posted by nerdistmonk View Post
My machine boots almost as fast as an Apple ][e, you switch it on, you hear a beep (you can add in the clunk clunk clunk clunk sound in your head)
and the thing is already sitting on a ly login screen before the monitor can finish initializing. I don't use plymouth, just Ly for the display manager,
and sway for the desktop.
And yeah, in my case, the motherboard post with almost every hardware option disabled but the ones I do have, takes more than the rest. Sadly, I cannot optimize that further.
Comment
Comment