Originally posted by mdedetrich
View Post
Announcement
Collapse
No announcement yet.
AMD's Modern Graphics Driver In Linux 5.14 Exceeds 3.3 Million Lines Of Code
Collapse
X
-
- Likes 6
-
Originally posted by iskra32 View Post
who actually cares about *lines of code* if we're talking about autogenerated headers. This stuff isn't a maintenance burden on the non-AMD maintainers, and the only real issue is that git operations on the kernel tree would take longer.
Originally posted by iskra32 View PostGiven your asinine takes on a stable kernel ABI, you certainly don't do that one very often. About that one, if you want a real world example, the Kernel's USB subsystem has been improved many times over the years(and nearly rewritten from scratch once too I think). Something that would have been thoroughly impossible if the kernel wanted to maintain a stable ABI for drivers of USB devices.
The amount frankly ridiculous/baseless assumptions flying around here is baffable. Its like no one in the Linux bubble has actually looked up real usecases of API's and their history/lifecycle and instead people are just spreading baseless FUD everywhere.
Also there is a difference between USB drivers and graphics drivers, there is nothing wrong with making an pragmatic exception/experiment with a type of hardware which is clearly in terms of design, scope and features way more extensive than a god damn USB/keyboard driver.
Comment
-
mdedetrich
The amount frankly ridiculous/baseless assumptions flying around here is baffable
Although I suspect we have different views regarding who's responsible for the "flying around" part. 😊
- Likes 1
Comment
-
Originally posted by tomas View Postmdedetrich
Well, at least we can agree on that.
Although I suspect we have different views regarding who's responsible for the "flying around" part. 😊
Comment
-
Originally posted by Slartifartblast View PostThat's a lot of unwanted baggage if you don't have/want or use an AMD GPU.
- roughly 85% of the "code" is header files, and those are only used as reference when compiling - they do not add to kernel or driver binary size
- in terms of code that gets compiled into a binary amdgpu is just over 2x the size of i915 but supports a wider range of architectures
- the headers compress very efficiently so don't have even have much impact on git operations
The primary reasons for headers being large are:
- we have separate headers for each IP block version, which makes the actual code smaller and easier to maintain
- we supply full headers (all registers/fields) for each IP block, not just the registers/fields the driver touches today
- we support a lot of HW generations in the same driver, with some very significant register layout changes between generations
Valid complaints could include:
- using up a tiny bit more of your disk space if you download source
- possibly making driver compiles a bit slower, although AFAIK each IP block references a very small number of header files so probably not
These discussions always remind me of the start of the Great LaRouche Toad-Frog Massacre from Bloom County:
On June 21, 1988, the following item appeared on page 3 of the daily Bloom Beacon, sandwiched between an article on the plummeting price of cow tongue and "Dear Abby":
COMMUNISTS AT U.S. DOORSTEP
by Milo Bloom, Investigative Reporter
Today it was discovered that after years of aggressive expansion, the Soviet Union has stretched its borders to within a mere 12 miles of American soil. The State Department has no immediate comment.
...which wasn't particularly surprising since the State Department had been aware for some time that the easternmost tip of Siberia comes within a polar bear's whisker of Alaska, but who cares since it's too damned cold to worry about. But the vast bulk of the Beacon's readership had no such knowledge and a subdued rumble of patriotic consternation coursed through the local population like some frightening new flu virus. The consensus was that something ought to be done.
"SOMETHING," bellowed Steve Dallas at a hastily called town meeting, "SHOULD BE DONE!"Last edited by bridgman; 15 July 2021, 03:55 PM.Test signature
- Likes 6
Comment
-
Originally posted by tomas View Post
1. There is a new interesting feature (not this case)
2. There is a some bug/critical issue/security problem (not this case)
3. Some benchmarking of hardware (not this case)
4. Deprecation of something (not this case)
5. Some concerning treand/issue (which is this case). Other examples including Steam Linux usage charts, distro/desktop usage charts/, increasing/decreasing hardware requirements for software etc etc
I mean the article headlines is literally "there is a huge bunch of AMD graphics code in the kernel". You can argue till the cows come home whether this is just an "observation" but
1. Its not the first article on this point
2. No one is going to make an article about an observation unless its pointing some positive (or negative trend) or that its entertaining (not sure about you, but the line count of the kernel isn't exactly entertaining in itself).
So yes the existence of this article implies there is an important observation being made, and unless anyone here is arguing that having such massive lines of code is a good thing (given if you have an alternative of it not being there all else things being equal). I am pretty damn sure the article wasn't written out of boredom. Also I am getting the impression no one really read the contents of the article (which is even if you ignore the header's, as a percentage of the Linux kernel the GPU driver code is outpacing everything else).
And yes, YOU may not think its an issue but that is subjective and also besides the point. This is one of the reasons why journalism exists, someone notices or finds something which they think can be concerning/an issue and they report about it.Last edited by mdedetrich; 15 July 2021, 02:42 PM.
Comment
-
Originally posted by mdedetrich View PostAre you seriously saying that an API is going to be as bloated as the entire AMD graphics driver?
You seem to suffer from a kind of specific bias, very close to the “confirmation bias” mechanism, the “public” bias, if you don't see what is not public you're free to imagine any imaginary comparison and nothing can defeat such dream.
if this code was living in a out-of-tree non-public repository and delivered as precompiled modules, you would not feel any bloat, same would apply if all those generated headers were kind of highly packed binary blob the rest of the open source driver would read.
Though, all that data is not produced to be tight-packed, it's produced to be human readable as far as I know, hence the extensiveness.
For example we may see people signing abusive contracts because they made them feel super important, since they “signed with them”, though they would kept their freedom and would have done more awesomeness without signing such contract, but you can see the bias: being subject to some very hard constrain, waive rights in order to be part of something, this can make a man feel he is part of a select club, that can make someone feel so important, while at some point it may be close to being a slave.
This is the same bias here: it's public, there is no select club, you can see how big such work is, AMD takes the risk you discover some part of modern industry is huge for one mind, well, it's good they don't lie: that's the world we live in, it's just truth and they don't hide it, and they would not hide the truth and close their driver to make you feel better.
Originally posted by marek View PostNobody said it was an issue.Originally posted by mdedetrich View PostThe existence of this article implies otherwise, its a concern at least.
Such kind of big numbers can be a very good sign, by itself they don't imply bloat, if those numbers are about bloat, that's bad, but if they are not about bloat, then this kind of number is awesome. Do you imagine if those 3.3 Million line are not bloat? That would mean we have 3.3 Million line of non-bloat code for AMD support in kernel, imagine how awesome that meaning would be? Do you know any other GPU brand that can compete with such awesomeness and support for Linux. If those 3.3 Million line are not bloat, do you know any other GPU brand that can claim having 3.3 Million line of non-bloat Linux code?
- Likes 4
Comment
-
mdedetrich
Wow Some people here can really be a bit thick/dense....
... Wall of text with a lot of ramblings...
Now, regarding the actual article. You assume that it was actually about something being an issue, but you can not really point to anything specific in the article to prove that point. Yes, I've read the article several times. Exactly where does it state that the number of lines of code for the AMD driver being an issue? And no, "reading between the lines" does not count. In fact, the article explicitly states
"Thankfully unused portions of these header files... are eliminated by the compiler at build time"
Now it's your turn. Let's generate some more ad revenue for Michael. 😉
- Likes 4
Comment
-
Originally posted by illwieckz View Post
No one said those 3.3 Million lines are bloat. This is 3.3 Million line of precious documentation and featureful code.
You seem to suffer from a kind of specific bias, very close to the “confirmation bias” mechanism, the “public” bias, if you don't see what is not public you're free to imagine any imaginary comparison and nothing can defeat such dream.
if this code was living in a out-of-tree non-public repository and delivered as precompiled modules, you would not feel any bloat, same would apply if all those generated headers were kind of highly packed binary blob the rest of the open source driver would read.
So yes, not noticing the code is what you rightly pointed about but it has nothing to do with confirmation bias but everything to do with abstraction/modularity.
There is also the other point of maintenance burden which if the code proportion (minus the headers) steadily grows over time (which it is, as pointed out in the article text).
Originally posted by illwieckz View PostYou seem to suffer from some bias, really. This article is just about numbers and doing statistics, then you want to see such numbers as a concern.
Originally posted by illwieckz View PostIf today another article states that AMD market share has reached this or that number, would you see it as a concern as well?
Originally posted by illwieckz View PostSuch kind of big numbers can be a very good sign, by itself they don't imply bloat, if those numbers are about bloat, that's bad, but if they are not about bloat, then this kind of number is awesome. Do you imagine if those 3.3 Million line are not bloat? That would mean we have 3.3 Million line of non-bloat code for AMD support in kernel, imagine how awesome that meaning would be? Do you know any other GPU brand that can compete with such awesomeness and support for Linux. If those 3.3 Million line are not bloat, do you know any other GPU brand that can claim having 3.3 Million line of non-bloat Linux code?
Comment
Comment