Linux Articles

Linus Torvalds wants new Linux 4.20 kernel restricted

linux 4.20

As reported recently, new Linux kernel 4.20 is causing 50 percent drop in performance in some Linux workstations. This drop in performance has been traced to a newly implemented migration known as “single thread indirect branch predictors” which is now in Linux 4.20 kernel by-default for Intel systems with latest microcode. It allows to prevent cross hyper thread control of decisions made by branch predictors indirectly.

STIBP is one of the three mitigation Intel has added in its firmware updates to deal with Spectre attacks. Other additions were ‘branch restricted speculation” and “indirect branch predictor barrier”. SITBP was assume to address issues with Intel CPUs with Hyper threading. Simultaneous multi-threading isn’t new thing but mitigation on some workstation caused drop in performance.

With STIBP enabled, many servers faced huge drop back. The high end Xeon Gold server at Phoronix went from the fastest server to slower than AMD’s old age server. These current set of events cause quite a stir among the Linux community. Linux Torvalds posted a message on Sunday demanding STIBP disabled by default in the kernel. According to him, it is better to have SMT disabled completely to save a drop in performance at such a large scale. He just doesn’t see any value associate with SMT being enabled by default right away.

Linux Torvalds released a note on Kernel emailing list saying:

This was marked for stable, and honestly, nowhere in the discussion
did I see any mention of just *how* bad the performance impact of this
was.
When performance goes down by 50% on some loads, people need to start
asking themselves whether it was worth it. It’s apparently better to
just disable SMT entirely, which is what security-conscious people do
anyway.
So why do that STIBP slow-down by default when the people who *really*
care already disabled SMT?
I think we should use the same logic as for L1TF: we default to
something that doesn’t kill performance. Warn once about it, and let
the crazy people say “I’d rather take a 50% performance hit than
worry about a theoretical issue”.

The researchers suggest that security and SMT are mutuall exclusive and ask users to avoid chips that feature SMT. A recent attack known as TLBleed promoted the OpenBSD to disable support for hyper threading. There were already some mitigations in Linux 4.19 against Spectre, Foreshadow etc. The performance drop is associated with Linux 4.20 that hits this year. The change done in new kernel was intentional and it can be reverted to recover some of the performance loss.Many developers have commented that the code should be reverted and restricted. AMD released a note against this by default whereas Intel also have similar stance.

Leave a Reply

Your email address will not be published. Required fields are marked *