From a15d23663bf3c1d0c2bd88d60f7174ed8205a074 Mon Sep 17 00:00:00 2001 From: Kroese Date: Sun, 2 Jun 2024 19:18:44 +0200 Subject: [PATCH] feat: CPU pinning --- src/proc.sh | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/proc.sh b/src/proc.sh index f870b9d..ff40651 100644 --- a/src/proc.sh +++ b/src/proc.sh @@ -4,10 +4,16 @@ set -Eeuo pipefail # Docker environment variables : "${KVM:="Y"}" +: "${CPU_PIN:=""}" : "${CPU_FLAGS:=""}" : "${CPU_MODEL:=""}" : "${DEF_MODEL:="neoverse-n1"}" +if [[ "${SYS,,}" == *"-rk35xx" ]]; then + # Pin to performance cores on Orange Pi 5 + CPU_PIN="4,5,6,7" +fi + if [[ "${ARCH,,}" != "arm64" ]]; then KVM="N" warn "your CPU architecture is ${ARCH^^} and cannot provide KVM acceleration for ARM64 instructions, this will cause a major loss of performance."