VFIO fixes and malachite things

This commit is contained in:
stitchy 2024-11-03 11:11:06 -08:00
parent c4e46d0a28
commit 53ef1f28c6
Signed by: stitchy
SSH key fingerprint: SHA256:p+xeQgmOvQ2br1d2STl5OnRRMef2LRqCtGA7SO4WYk0
3 changed files with 24 additions and 10 deletions

View file

@ -40,6 +40,14 @@ let
# Load VFIO Kernel Module
modprobe vfio vfio_pci vfio_iommu_type1
# Performance Governer
for file in /sys/devices/system/cpu/cpu*/cpufreq/scaling_governor; do echo "performance" > "$file"; done
# Isolating CPU
systemctl set-property --runtime -- user.slice AllowedCPUs=16-19
systemctl set-property --runtime -- system.slice AllowedCPUs=16-19
systemctl set-property --runtime -- init.scope AllowedCPUs=16-19
elif [[ "$HOOK_NAME/$STATE_NAME" == "release/end" ]]; then
modprobe -r vfio_iommu_type1 vfio_pci vfio
@ -61,6 +69,13 @@ let
# Reload Modules
modprobe amdgpu
# Back to On-Demand Scheduler
for file in /sys/devices/system/cpu/cpu*/cpufreq/scaling_governor; do echo "ondemand" > "$file"; done
systemctl set-property --runtime -- user.slice AllowedCPUs=0-19
systemctl set-property --runtime -- system.slice AllowedCPUs=0-19
systemctl set-property --runtime -- init.scope AllowedCPUs=0-19
fi
fi