For those having issues with their new AMD Ryzen CPU’s SMT functionality in Linux, the latest kernel version 4.10.3 rectifies the issue which was present in kernel version 4.9 and below.
Older versions of the Linux kernel bundles both the threadID and the APIC ID together when SMT is enabled. This causes the OS to assign a unique CPU Core ID to each thread instead of the same CPU ID to a pair of threads.
The Linux kernel development page describes the error as the following:
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.
As it’s a SMT issue, the issue would manifest itself when the CPU is given heavily multithreaded tasks. The scheduler would be unable to recognize the thread pairs and distribute workload correctly, causing potential dips in performance.
Though the issue has been fixed and committed since last month, Kernel version 4.10.3 with the committed changes wasn’t released until recently. Those interested in updating the Kernel the hard way can download the latest Kernel via the Linux Kernel Archives page here.