improve cleanup

This commit is contained in:
Josh Lay 2020-11-09 19:22:44 -06:00
parent b4c70af268
commit 29b144bd8d

View file

@ -12,7 +12,7 @@
# - resets host isolation on VM shutdown
#
# define the CPUs (cores/threads) to isolate for the VM
VM_CORES='0-19,24-43'
VM_CORES='0-20,24-44'
# Tip: refer to 'virsh capabilities | grep siblings'
# this will show CPU topology information for the host
# allows one to pick optimal layout for the VM
@ -38,7 +38,11 @@ sudo sh -c 'sysctl vm.stat_interval=120 ; sysctl kernel.watchdog=0'
# attempt to reset shielding, we want to create it with current params
# and remove any existing slices from previous VM boots
# we want it to be created with current params, such as possibly-changed pinned CPUs
sudo sh -c 'cset shield --reset --sysset=host.slice --userset=windows10.slice ; cset set -d windows10.slice'
sudo cset shield --reset --sysset=host.slice --userset=windows10.slice || echo "something happened resetting shielding"
# destroy old cpusets
sudo cset set -d windows10.slice || echo "ignoring failure to destroy VM cpuset"
sudo cset set -d host.slice || echo "ignoring failure to destroy host cpuset"
# shield cores
# userset slice must match the partition defined in libvirt xml, eg: