Comment by bcaa7f3a8bbc

8 years ago

Does anyone know the best way to disable hyperthreading on Linux?

Okay, I found it. A SMT knob was added alongside in the L1TF fixes.

    /sys/devices/system/cpu/smt

    /sys/devices/system/cpu/smt/active

    /sys/devices/system/cpu/smt/control

    active:  Tells whether SMT is active (enabled and siblings online)
    control: Read/write interface to control SMT. Possible

    values:

    "on"		SMT is enabled
    "off"		SMT is disabled
    "forceoff"   	SMT is force disabled. Cannot be changed.
    "notsupported"	SMT is not supported by the CPU

    If control status is "forceoff" or "notsupported" writes are rejected.