Advertisement
wkchu

qemu

Oct 8th, 2021
1,344
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 0.84 KB | None | 0 0
  1. #!/bin/bash
  2.  
  3. ###### OLD CPUSET SCRIPT, DOESN'T WORK ANYMORE SINCE CGROUPS V2
  4. #OBJECT="$1"
  5. #OPERATION="$2"
  6. #SUBOPERATION="$3"
  7. #EXTRA_ARG="$4"
  8. #
  9. #case "$OPERATION" in
  10. #        "prepare")
  11. #                cset shield -c 1,2,3,4,5,6,7,9,10,11,12,13,14,15 -k on
  12. #                ;;
  13. #        "release")
  14. #                cset shield -r
  15. #                ;;
  16. #esac
  17.  
  18. command=$2
  19.  
  20. if [[ $command == "started" ]]; then
  21.     systemctl set-property --runtime -- system.slice AllowedCPUs=0,8
  22.     systemctl set-property --runtime -- user.slice AllowedCPUs=0,8
  23.     systemctl set-property --runtime -- init.slice AllowedCPUs=0,8
  24. elif [[ $command == "release" ]]; then
  25.     systemctl set-property --runtime -- system.slice AllowedCPUs=0-15
  26.     systemctl set-property --runtime -- user.slice AllowedCPUs=0-15
  27.     systemctl set-property --runtime -- init.slice AllowedCPUs=0-15
  28. fi
  29.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement