Linus Torvalds 不滿 Linux Kernel 4.20 出現效能下降
之前我們曾報道過,Phoronix 近日測試發現,在幾乎所有低中高階英特爾處理器上,最新測試版核心 Linux 4.20 的表現比最新穩定版 4.19 有顯著的下降,而 AMD 的處理器不受影響。出現效能下降的原因與英特爾處理器漏洞修補有關,4.20 的主要改變是對英特爾支援超執行緒的處理器預設啟用了 STIBP,防止間接分支預測器的跨執行緒控制。
針對此事,Linus Torvalds 感到驚訝,他在ofollow,noindex">郵件列表 中表示自己在討論列表中居然沒有看到任何關於會影響效能的字眼。當在某些負載下效能下降 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 說我們的立場也是如此。”