SMP/Core brings partial SMT support to linux v6.6

The Linux kernel has introduced a nuanced approach to managing Simultaneous Multi-Threading (SMT) on CPU cores. Up until now, the Linux kernel allowed users to either completely enable or disable SMT on a CPU core via the /sys/devices/system/cpu/smt/control
interface. It was a binary "on" or "off" decision, with no room for granularity.
However, this recent pull request has introduced the ability to partially enable SMT threads. This means that you can now specify the exact number of SMT threads you'd like to bring online for a given CPU core. This is done through the same /sys/devices/system/cpu/smt/control
interface, which now accepts a numerical value representing the number of SMT threads you'd like to enable.
Currently linux kernel only supports "on" or "off" state for smt state of core. There is no support to partially enable SMT threads. This pull request brings in the support where we can provide no. of threads to /sys/devices/system/cpu/smt/control interface which can control the no. of SMT threads brought online.
- Support partial SMT enablement. So far the sysfs SMT control only allows to toggle between SMT on and off. That's sufficient for x86 which usually has at max two threads except for the Xeon PHI platform which has four threads per core. Though PowerPC has up to 16 threads per core and so far it's only possible to control the number of enabled threads per core via a command line option. There is some way to control this at runtime, but that lacks enforcement and the usability is awkward. This update expands the sysfs interface and the core infrastructure to accept numerical values so PowerPC can build SMT runtime control for partial SMT enablement on top. The core support has also been provided to the PowerPC maintainers who added the PowerPC related changes on top.
Comments ()