AMD's Ryzen Will Really Like A Newer Linux Kernel
Written by Michael Larabel in AMD on 26 February 2017 at 08:57 PM EST. 77 Comments
AMD --
AMD's Ryzen CPU is finally shipping in a few days! If you are planning to be an early adopter of AMD Ryzen processors, you will really want to be running a newer Linux kernel release for proper support and performance.

I haven't received any communication from AMD about any review samples or the like, so I am not under NDA for the upcoming AMD Ryzen launch on 2 March... And thankfully received some information from a reliable source this weekend regarding Ryzen support Linux requirements. So here they are.

I am told that if using Ubuntu 16.10 / Ubuntu 16.04.2 as a base state for AMD Ryzen, users should generally be okay. In other words, you won't get a kernel oops on boot or anything dramatic like that but could be missing some functionality. However, you will really be better off with a newer Linux kernel.

As I wrote about back in December, Linux 4.10 landed a lot of Zen/Ryzen code. So with Linux 4.10 looks to be -- and reaffirmed by this trusted confidant -- a good point for AMD Ryzen testing and usage. So far in the Linux 4.11 cycle we haven't seen anything Ryzen-specific appear to come through.

But if you don't feel comfortable moving to the recently-released Linux 4.10 or your distribution hasn't yet offered you an easy upgrade path, an alternative is to be running at least Linux 4.9.10.

I was pointed out in particular to this kernel commit that only landed in early February: "x86/CPU/AMD: Fix Zen SMT topology." It notes in the commit message, "After: a33d331761bc ("x86/CPU/AMD: Fix Bulldozer topology") our SMT scheduling topology for Fam17h systems is broken, because the ThreadId is included in the ApicId when SMT is enabled. So, without further decoding cpu_core_id is unique for each thread rather than the same for threads on the same core. This didn't affect systems with SMT disabled. Make cpu_core_id be what it is defined to be." That mentioned regression was introduced only in January but had been pulled back into stable kernel point releases from Linux 4.6 and newer. This fix for the (Ry)zen SMT topology is in Linux 4.10 and was back-ported to Linux 4.9.10+ for those still riding the 4.9 kernel.

Without that fix, you could be affected by broken SMT scheduling topology. Simultaneous Multi-Threading is one of the new features for AMD Ryzen/Zen and will play a big role. For instance, with the Ryzen 7 CPUs they are 8 cores but 16 threads via SMT. If you care about multi-threaded performance, just make sure you are riding a newer kernel release.

I am told that besides that, recent Linux kernels should be in good shape, but as generally is the case: the newer the better. One of the bigger focuses could be on the AMD Ryzen motherboard support. Some Ryzen launch motherboards are using the Realtek ALC1220 audio codec, for example, and that is support is only coming to Linux 4.11. Among the AMD motherboards using the ALC1220 codec are the Biostar X370GT7, Gigabyte GA-AX370-Gaming 5, Gigabyte GA-AB350-Gaming 3, and others.
About The Author
Author picture

Michael Larabel is the principal author of Phoronix.com and founded the site in 2004 with a focus on enriching the Linux hardware experience. Michael has written more than 10,000 articles covering the state of Linux hardware support, Linux performance, graphics drivers, and other topics. Michael is also the lead developer of the Phoronix Test Suite, Phoromatic, and OpenBenchmarking.org automated benchmarking software. He can be followed via Twitter or contacted via MichaelLarabel.com.

Related AMD News
Popular News