Earlier quoted context omitted.
Hey boss, I don't understand why the code works in devel but fails in production?
You're implying (with unnecessary snark) that: 1. Development machines should be configured identically to production machines. (Do you install a GUI and development tools on your production servers?) Occasional differences in behavior between development/production are par for the course, and is why staging environments are commonly used. 2. The mitigations affect the execution result of code likely to be developed/…
Bisected: The Unfortunate Reason Linux 4.20 Is Running Slower
101–110 of 114 posts
Re: Bisected: The Unfortunate Reason Linux 4.20 Is Running Slower
#102Earlier quoted context omitted.
Somehow I doubt nuclear power plants run (unmodified) Linux kernels released in the last 5 years
Exactly... they're running on XP so it's all good
Re: Bisected: The Unfortunate Reason Linux 4.20 Is Running Slower
#1031.3-1.4x slowdown is a lot more than I expected (I know it's for synthetic benchmarks but still...) Can someone explain (or link to an article) how a tweak to HT branch prediction heuristic can have such a huge impact on performance?
The impact is big enough that one would suspect the microcode simply disables indirect branch prediction, so you pay a 16-20 cycle penalty per branch. Indirect branches just aren't frequent enough to explain such a regression via say a simple reduction in prediction resources. I can test it once I get the new firmware.
aren't vtable calls / function pointer calls indirect branches ?
Re: Bisected: The Unfortunate Reason Linux 4.20 Is Running Slower
#104Earlier quoted context omitted.
Apparently the way to turn this and other mitigations off is the following mouthful: pti=off spectre_v2=off l1tf=off nospec_store_bypass_disable no_stf_barrier Would it make sense to have a single flag to "run insecure but fast" that we can use on pure development machines, test servers and the like? My Intel development server only runs code I choose.
This alphabetti spaghetti of boot flags is getting ridiculous, there seems to be no central list anywhere, just random snippets across the web. Why is there not a Linus rant when you really need one? :-(
modinfo ${somemodule}
man lsmod man modinfo
This is elementary level linux, you should know this.
Re: Bisected: The Unfortunate Reason Linux 4.20 Is Running Slower
#105Earlier quoted context omitted.
The impact is big enough that one would suspect the microcode simply disables indirect branch prediction, so you pay a 16-20 cycle penalty per branch. Indirect branches just aren't frequent enough to explain such a regression via say a simple reduction in prediction resources. I can test it once I get the new firmware.
> Indirect branches just aren't frequent enough aren't vtable calls / function pointer calls indirect branches ?
Re: Bisected: The Unfortunate Reason Linux 4.20 Is Running Slower
#106Earlier quoted context omitted.
> Indirect branches just aren't frequent enough aren't vtable calls / function pointer calls indirect branches ?
Yes, they are (at least when the compiler cannot devirtualize them) - but they make up a fairly small fraction of the total instructions in a typical program - and probably very small in something like cinebench, which also showed a big regression.
but if their cost increases by a large factor... besides, in any large compiled program, the core would certainly be based around some kind of programmable pipeline, and these would generally be implemented like this unless they wrote their own JIT compiler.
Re: Bisected: The Unfortunate Reason Linux 4.20 Is Running Slower
#107Earlier quoted context omitted.
Yes, they are (at least when the compiler cannot devirtualize them) - but they make up a fairly small fraction of the total instructions in a typical program - and probably very small in something like cinebench, which also showed a big regression.
> but they make up a fairly small fraction of the total instructions in a typical but if their cost increases by a large factor... besides, in any large compiled program, the core would certainly be based around some kind of programmable pipeline, and these would generally be implemented like this unless they wrote their own JIT compiler.
I didn't follow your comment about a "programmable pipeline". I don't think many or any of the Phoronix benchmarks are based on a pipeline with indirect branches at their core.
Re: Bisected: The Unfortunate Reason Linux 4.20 Is Running Slower
#108I'm just sitting here waiting for all the security fiasco to stop ruining performance for ridiculous unpractical attacks. Just a matter of time, the pressure for better performance in a world where moore's law is getting stuck will eventually cause every sane person to throw these ridiculous patches out of the window. If the choice is between unsecure but fast to secure and slow, the default should be fast. Let appli…
Re: Bisected: The Unfortunate Reason Linux 4.20 Is Running Slower
#109Earlier quoted context omitted.
Apparently the way to turn this and other mitigations off is the following mouthful: pti=off spectre_v2=off l1tf=off nospec_store_bypass_disable no_stf_barrier Would it make sense to have a single flag to "run insecure but fast" that we can use on pure development machines, test servers and the like? My Intel development server only runs code I choose.
Hey boss, I don't understand why the code works in devel but fails in production?
Re: Bisected: The Unfortunate Reason Linux 4.20 Is Running Slower
#110Earlier quoted context omitted.
> but they make up a fairly small fraction of the total instructions in a typical but if their cost increases by a large factor... besides, in any large compiled program, the core would certainly be based around some kind of programmable pipeline, and these would generally be implemented like this unless they wrote their own JIT compiler.
Yes - but for their cost to increase by such a large factor, the only obvious thing I can think of is that their prediction is disabled. I didn't follow your comment about a "programmable pipeline". I don't think many or any of the Phoronix benchmarks are based on a pipeline with indirect branches at their core.
I think a bunch are. e.g. for instance FFMPEG / libavfilter which is basically a node graph set up at runtime. Don't know for cinebench since it's closed source, but Blender present in the benchmarks is also based around a nodal rendering architecture. Stuff like PHP / CGI also heavily depend on function pointers for their behaviours - PHP with its plugin architecture, and CGI where all web requests go through FPs : https://github.com/php/php-src/blob/master/main/fastcgi.c#L8....