Re:Spectre mitigations murder userspace performance
by asdfasgasdgasdg on Sunday June 20, 2021 @08:03AM
(#27569236)
For anyone considering whether to disable these for desktop performance, I tried to do some research on how much it helps, at least for my workload. From what I was able to read, for gaming, the performance differences are negligible. There also seems to be some indication that disabling mitigations is also harmful to performance on more recent CPUs, since more and more of the mitigations are being baked into the silicon.
https://www.reddit.com/r/intel/comments/kp6b6i/how_bad_is_it...
FeatureSettingsOverride is a bit field where bit 0 controls the mitigation for CVE-2017-5715 (Spectre) and bit 1 controls it for CVE-2017-5754 (Meltdown). If the bit value is 0 the corresponding mitigation is enabled, if 1 it's disabled. FeatureSettingsOverrideMask is simply a mask to control which bits of FeatureSettingsOverride to apply. So, for example, FeatureSettingsOverride = 2 and FeatureSettingsOverrideMask = 3 would enable the Spectre mitigation (if available) and disable the Meltdown one.
More info here:
https://support.microsoft.com/en-us/topic/windows-server-gui...
https://gist.github.com/daBONDi/6f86210e54c68e84e85372fc4d1f...
Haven't checked if the program emits different behavior for other CPU's or OS versions.