AMD recently reported that the Predictive Store Forwarding (PSF) mechanism in Zen 3 processors is vulnerable to side-channel attacks (like Spectre and Meltdown), which are based on analyzing data deposited in the processor cache during speculative instruction execution. The company told users how they can protect themselves and disable this functionality, but did not comment on how it would affect performance. Phoronix journalists decided to clarify this issue.
The new Predictive Store Forwarding (PSF) mechanism in AMD Zen 3 processors has been exposed to a hardware vulnerability of reading data through a third-party channel. In theory, disabling this feature should reduce performance, and that's the effect we've seen with Intel processors during the Spectre and Meltdown vulnerability remediation process. But at the moment AMD refers to the fact that there are no known cases of PSF vulnerability exploitation, so it does not recommend end users to disable the functionality to avoid performance degradation. The PSF mechanism is disabled in Zen 3 processors by setting certain MSR bits. AMD has promised in a white paper to publish Linux patches to easily disable PSF if needed, but there are no publicly available patches yet.
Nevertheless, Michael Larabel from Phoronix has built a Linux operating system kernel with PSF disabled and has done dozens of tests with AMD Ryzen 5000 and EPYC 7003 series processors on bare-metal and PSF disabled kernels. According to him, the testing was done on a wide range of workloads, and each test was run automatically several times. As a result, it had to be stated that PSF disabling had a minimal effect on performance. In most cases the difference was within statistical error, although in some workloads it was close to 1 %. For example, Ryzen 7 5800X processor was run through a set of more than 100 tests. That said, averaging all the results suggests less than 1.5 % performance loss when the potentially dangerous Zen 3 feature is disabled.
In short, while AMD generally does not recommend its customers to disable PSF, if someone decides to take this step in the name of improving security, it probably won't result in any significant performance difference. Unlike other patches designed to combat attacks related to speculative command execution, this time everything was handled with little blood.