[cfarm-users] Temporarily disabling SMT

Brice Goglin Brice.Goglin at free.fr
Thu Oct 22 18:16:09 CEST 2020


Hello

Recent Linux kernels (4.19 iirc) have a switch to toggle SMT in
/sys/devices/system/cpu/smt/control (write "on" or "off" in this file).
Current state can be read from /sys/devices/system/cpu/smt/active

Brice


Le 22/10/2020 à 17:24, Alexander Kruppa via cfarm-users a écrit :
> Hello,
>
> would it be possible to allow users to disable SMT (a.k.a.
> hyperthreading) temporarily on one cpu core? This would be useful for
> doing timing runs that are not affected by other processes running on
> another logical cpu on the same physical core.
>
> This can be accomplished by taking all but one logical cpu on a
> physical core offline via
> /sys/devices/system/cpu/cpu*/online
> For example, on gcc121,
> $ head /sys/devices/system/cpu/cpu??/topology/thread_siblings_list |
> tail -n 2
> ==> /sys/devices/system/cpu/cpu31/topology/thread_siblings_list <==
> 15,31
> shows that logical cpus 15 and 31 are on the same physical core. With
> # echo 0 > /sys/devices/system/cpu/cpu31/online
> as root, logical cpu 31 can be taken offline, so that processes on
> logical core 15 run effectively without SMT interference until logical
> core 31 is put online again.
>
> Is there any interest in allowing such a mechanism?
>
> All the best,
> Alex
>
> _______________________________________________
> cfarm-users mailing list
> cfarm-users at lists.tetaneutral.net
> https://lists.tetaneutral.net/listinfo/cfarm-users
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.tetaneutral.net/pipermail/cfarm-users/attachments/20201022/ad0c56e0/attachment.html>


More information about the cfarm-users mailing list