Originally posted by CochainComplex
View Post
Fast Kernel Headers v2 Posted - Speeds Up Clang-Built Linux Kernel Build By ~88%
Collapse
X
-
-
-
Originally posted by atomsymbol
[...]
As to other approaches attempted: I also tried enabling the kernel to use pre-compiled headers (with GCC), which didn't bring a performance improvement beyond a 1-2% for repeat builds. Plus during development most of the precompiled headers are cache-cold in any case and need to be generated by the compiler again and again.
[...]
So it seems that the increase of speed is due mostly to the header re-organization.
Leave a comment:
-
-
Originally posted by oleid View Post
Why would it change runtime speed? This is about changing the include hierarchy. There is zero chance it will have a runtime impact.
Leave a comment:
-
-
Originally posted by tiennou View PostAre you planning already some benchmark comparison between the original kernel and the fast header version ? Would be nice to confirm it doesn't generaWhy would runtime speed change? This is Scott shifting code in headsets.
te any slowdown a runtime.
edit: we did something similar a few years ago, albeit with a c++ codebase: Find out what headers get included all the time and slim them down (by including less and replacing actual class definitions with forward declarations; the definitions are most of the time only needed in the cpp file).Last edited by oleid; 09 January 2022, 07:12 AM.
Leave a comment:
-
-
Just gave the patchset a whirl. Freakin incredible.
Cut my kernel build time on the 5800X from roughly 7min 10s seconds to 4min 40s
Ingo, you brilliant son of a gun! That's seriously an incredible effort that is going to be pay huge dividends over time.
Here's the git diff I used to make the patch if anyone needs:
Code:$ git diff 391ce485ced0e47bf8d2ce8bc32bb87887e16656 c9e6606c7fe92b50a02ce51dda82586ebdf99b48 > fast_kernel_headers-v2.patch $ patch -p1 < ./fast_kernel_headers-v2.patch
Leave a comment:
-
-
Originally posted by bug77 View PostOff topic, but I'm constantly amazed to keep even experienced developers that fail to grasp two simple things (imho):
1. the more featured a language is, the more it takes to compile; you want generics, type inference, even inheritance, named parameters, be prepared to pay a price
2. longer compile times are always justified when they result in faster production code (which is almost all the time); languages like Java or C# may appear fast to compile, but they do not link anything - you'll pay a hefty runtime penalty for that
More on topic, the biggest expectation I have from these patches, whenever they manage to land, is that shorter build times will make fuzzing more feasible, so a lot more bugs will be exposed and patched.
It's also worth considering that how you use a language has a lot to do with compile times. I once had a template-heavy C++ file that took a couple minutes to compile and doing so used a couple GB of memory. Once I eliminated some unnecessary template parameter type deduction, it took only a few seconds to compile and I think memory usage dropped accordingly. Although this particularly bad example involves C++, I can imagine things one might do in C that also create needless burden, such as having lots of overlong and inline functions.
Part of the software engineering discipline is understanding how to use programming language features in a scalable and maintainable way.
Leave a comment:
-
-
Originally posted by skeevy420 View PostIs a Ferrari really the most appropriate image to represent faster build times? I'm just saying that it can take a year or two from order to delivery when you buy a Ferrari.
A Ford Model T, OTOH, would have been very appropriate.
d796fd6d16fe14ec6912213bf12c7829.jpg....;PLast edited by CochainComplex; 09 January 2022, 05:42 AM.
Leave a comment:
-
-
Originally posted by tildearrow View PostProblem is, Phoronix is a very technical site, and for technical articles it is difficult to associate images with them, especially when the concepts are so abstract that they don't exist or cannot be represented with an object.
If you wanted more abstract iconography, I'd go with some kind of hand-crank grinder with streams of C statements flowing into it and chunks of binary being spit out the other side.
Leave a comment:
-
-
Originally posted by Mark Rose View Post
It should mostly be a matter of including new header files. The function signatures and types aren't changing, just the location of their definitions. It's nothing that those who don't mainline their modules don't already deal with.
Or is it like 99% is going to be the same but a few headers that needed more work?
Oh well. I haven't looked into the changeset, so might aswell do that.
Thanks.
Leave a comment:
-
Leave a comment: