
The /sys/devices/system/cpu/smt/control sysfs interface currently allows for forcing SMT on/offfrom user-space. But with patches set to go into Linux 6.6, it will allow for partial SMT states in the event of processors supporting multi-way SMT like with IBM processors.
Rather than the sysfs interface being used for just turning SMT on/off, an integer value can be specified for the number of SMT threads per processor to utilize.
This support was queued into tip/tip.git's smp/core branch ahead of the Linux 6.6 merge window opening in a few weeks. See that patch for more details on the updated SMT control sysfs interface.