feat: CPU pinning for Rockchip Orange Pi 5 (#98)
This commit is contained in:
parent
d530bc26d4
commit
b862a76ba1
3 changed files with 12 additions and 2 deletions
|
@ -108,7 +108,7 @@ kubectl apply -f kubernetes.yml
|
||||||
|
|
||||||
* ### How do I boot without SCSI drivers?
|
* ### How do I boot without SCSI drivers?
|
||||||
|
|
||||||
By default, the machine makes use of `virtio-scsi` drives for performance reasons, and even though most Linux kernels bundle the necessary driver for this device, that may not always be the case for some other operating systems.
|
By default, the machine makes use of `virtio-scsi` drives for performance reasons, and even though most Linux kernels bundle the necessary driver for this device, that may not always be the case for other operating systems.
|
||||||
|
|
||||||
If your machine fails to detect the hard drive, you can modify your compose file to use `virtio-blk` instead:
|
If your machine fails to detect the hard drive, you can modify your compose file to use `virtio-blk` instead:
|
||||||
|
|
||||||
|
|
|
@ -19,4 +19,8 @@ trap - ERR
|
||||||
|
|
||||||
info "Booting image${BOOT_DESC}..."
|
info "Booting image${BOOT_DESC}..."
|
||||||
|
|
||||||
exec qemu-system-aarch64 ${ARGS:+ $ARGS}
|
if [ -z "$CPU_PIN" ]; then
|
||||||
|
exec qemu-system-aarch64 ${ARGS:+ $ARGS}
|
||||||
|
else
|
||||||
|
taskset -c "$CPU_TASK_SET" exec qemu-system-aarch64 ${ARGS:+ $ARGS}
|
||||||
|
fi
|
||||||
|
|
|
@ -4,10 +4,16 @@ set -Eeuo pipefail
|
||||||
# Docker environment variables
|
# Docker environment variables
|
||||||
|
|
||||||
: "${KVM:="Y"}"
|
: "${KVM:="Y"}"
|
||||||
|
: "${CPU_PIN:=""}"
|
||||||
: "${CPU_FLAGS:=""}"
|
: "${CPU_FLAGS:=""}"
|
||||||
: "${CPU_MODEL:=""}"
|
: "${CPU_MODEL:=""}"
|
||||||
: "${DEF_MODEL:="neoverse-n1"}"
|
: "${DEF_MODEL:="neoverse-n1"}"
|
||||||
|
|
||||||
|
if [[ "$CPU" == "Cortex A55" ]] || [[ "${SYS,,}" == *"-rk35xx" ]]; then
|
||||||
|
# Pin to big cores on Rockchip Orange Pi 5
|
||||||
|
CPU_PIN="4,5,6,7"
|
||||||
|
fi
|
||||||
|
|
||||||
if [[ "${ARCH,,}" != "arm64" ]]; then
|
if [[ "${ARCH,,}" != "arm64" ]]; then
|
||||||
KVM="N"
|
KVM="N"
|
||||||
warn "your CPU architecture is ${ARCH^^} and cannot provide KVM acceleration for ARM64 instructions, this will cause a major loss of performance."
|
warn "your CPU architecture is ${ARCH^^} and cannot provide KVM acceleration for ARM64 instructions, this will cause a major loss of performance."
|
||||||
|
|
Loading…
Reference in a new issue