Linus Torvalds 不滿Linux Kernel 4.20 出現性能下降
Phoronix近日測試發現,在幾乎所有低中高端英特爾處理器上,最新測試版內核Linux 4.20的表現比最新穩定版4.19有顯著的下降,而AMD的處理器不受影響。出現性能下降的原因與英特爾處理器漏洞修補有關,4.20的主要改變是對英特爾支持超線程的處理器默認啟用了STIBP,防止間接分支預測器的跨線程控制。
針對此事,Linus Torvalds感到驚訝,他在郵件列表中表示自己在討論列表中居然沒有看到任何關於會影響性能的字眼。當在某些負載下性能下降50%時,應該先反問是否值得,而不是不管不顧。
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”.
—— Linus
他補充道,“我不認為代碼需要還原,但是無條件啟用STIBP 的’行為’需要更正。因為這付出的代價顯然比你們之前告知的更大。 ”
來自Intel 的Linux 資深人士Arjan van de Ven 也表示,“在文檔中,AMD 官方已有建議不要默認這樣做,我可以代表Intel 說我們的立場也是如此。”