HT warning

This commit is contained in:
Andreas Abel
2021-11-12 16:46:23 +01:00
parent bcea7500f6
commit c44530c8d2
5 changed files with 25 additions and 21 deletions

View File

@@ -240,6 +240,9 @@ if os.geteuid() != 0:
if not os.path.exists('/sys/nb'):
sys.exit('Error: nanoBench kernel module not loaded\nLoad with "sudo insmod kernel/nb.ko"')
if readFile('/sys/devices/system/cpu/smt/active').startswith('1'):
print('Note: Hyper-threading is enabled; it can be disabled with "sudo ./disable-HT.sh"', file=sys.stderr)
prevNMIWatchdogState = readFile('/proc/sys/kernel/nmi_watchdog')
writeFile('/proc/sys/kernel/nmi_watchdog', '0')