If this is your first visit, be sure to
check out the FAQ by clicking the
link above. You may have to register
before you can post: click the register link above to proceed. To start viewing messages,
select the forum that you want to visit from the selection below.
Announcement
Collapse
No announcement yet.
"CC_OPTIMIZE_FOR_PERFORMANCE_O3" Performance Tunable Dropped In Linux 6.0
When I was younger I gained some bad memories of girls, especially older women, being scary to talk to and rejecting me so I now don't talk to them even though 28 years have passed.
how to spot nerds...they speak of girls and compilereflags in one sentence
So they are giving the easy option to enable -O3 if you want ... or there are apparently distros doing just that so just use that distro and be done with it. Me, personally, I am paid to develop solutions, and no part of that is debugging edge-case kernel crashes. I want stability...period, and I will always take guidance from the people who own the code because they know far more than myself how to best use their product.
Reminds me of the conservative racecar engineer telling that speed above 150km/h in corner xyz is not save because...techyadayada. But after 10 rounds petrolhead "no brainer" testdriver jumps out of the car shouting: did you see? I beat the 160km/h mark in the corner?! wuhhuu that was fing awesome.
So they are giving the easy option to enable -O3 if you want ... or there are apparently distros doing just that so just use that distro and be done with it. Me, personally, I am paid to develop solutions, and no part of that is debugging edge-case kernel crashes. I want stability...period, and I will always take guidance from the people who own the code because they know far more than myself how to best use their product.
Most sensible thing I have read in a while on this topic.
That and what kozman wrote about fuzzing it yourself if it's important to you.
BTW, it can be some kind of https://en.wikipedia.org/wiki/Survivorship_bias
Not that there lack of -O3 users, but there a lot of -O3 users actually and they noticed ... no difference or breakage, so no reports.
Also to note: the main goal of GentooLTO was to find and report bugs, and I hope we helped a lot (LTO, -O3, GCC GRAPHITE, etc.).
Like anything, someone has to take the 1st steps to use -O3 a LOT. Beat the hell out of O3 from all angles. Find those pesky corner cases. Fuzz, if possible, the crap out of O2 and then O3 and compare side by side. I'm no compiler expert but at the very least, it requires years of people beating on it but, most importantly, reporting results and errors.
I shipped a product with a large, complex codebase using -O3. We had a nightly regression test suite that took about 8 hours on an 8-core 3.4 GHz server. Tested it every night for more than a decade, from probably GCC 4.6 to 9.3. In that time, we never hit any compiler bugs, though we were not on the bleeding edge.
Get -O2 running as close to perfect before you go heralding or cursing what O3 can bring to the table. It seems it still needs some more time to mature and develop. It's not worth losing data to score a couple more % of perf.
I just hope they're reporting those effect and, if they can be fixed, contributing fixes to stabilize that O3 feature.
First, your premise that -O3 isn't already stable is flawed.
Second, the fact that Clear Linux continues to use -O3 implies they must have fixed any bugs they hit, which they're unlikely to do without upstreaming those fixes, which they can't do without reporting the bugs.
I will always take guidance from the people who own the code because they know far more than myself how to best use their product.
Eh, it seems to me the kernel developers don't necessarily know a lot more about -O3 than you do, because the topic seems taboo. If no one goes there, it will forever stay shrouded in mystery.
Reminds me of the conservative racecar engineer telling that speed above 150km/h in corner xyz is not save because...techyadayada. But after 10 rounds petrolhead "no brainer" testdriver jumps out of the car shouting: did you see? I beat the 160km/h mark in the corner?! wuhhuu that was fing awesome.
That's a flawed analogy, since race engineers usually warn drivers about things which put the car at risk for mechanical failure or perhaps excessive tire wear. Otherwise, they know the driver is going to push the car as hard as it can go.
In that scenario, they have some basis for their thinking. In this case, we have nothing but old anecdotes and superstition.
Regarding your quoted results: is the first set reporting the time to complete a fixed workload and the second set reporting the speed achieved? In other words, "lower is better", in the first test, but "higher is better" in the second?
Comment