Config files to make everyday life easier...
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

smt.sh 538B

1234567891011121314151617181920212223242526
  1. function hyperthreading {
  2. case "${1^^}" in
  3. "OFF")
  4. pkexec tee /sys/devices/system/cpu/smt/control <<< off
  5. # Update Julia settings
  6. if [ -v $JULIA_NUM_THREADS ]; then
  7. exit 0;
  8. else
  9. JULIA_NUM_THREADS=$(nproc)
  10. fi
  11. ;;
  12. "ON")
  13. pkexec tee /sys/devices/system/cpu/smt/control <<< on
  14. # Update Julia settings
  15. if [ -v $JULIA_NUM_THREADS ]; then
  16. exit 0;
  17. else
  18. JULIA_NUM_THREADS=$(nproc);
  19. fi
  20. ;;
  21. *)
  22. printf "\nTo enable or disable hyperthreading dinamically, use ON or OFF."
  23. ;;
  24. esac
  25. }