Open mikhail-sakhnov opened 2 months ago
I suggest to move that to the start and also switch to online/offline on x86. I believe that will autoscaling also more robust on x86.
In the existing NeonVM platform, CPU hotplugging is used to dynamically scale CPU resources up or down. The NeonVM controller (neonvm/controllers/vm_controller.go) sends commands via QMP to the QEMU hypervisor. When CPUs are added or removed, a udev rule (neonvm/tools/vm-builder/files/vminit) inside the VM automatically marks the newly added CPUs as online.
While this method works effectively on x86_64 architectures, the ARM architecture in QEMU does not support CPU hotplugging.
To support CPU scaling on ARM, we will implement a different approach. Instead of hotplugging, all potential CPUs will be allocated to the VM instance during startup. Any CPUs beyond the current scaling limit will be marked as offline. The control of CPU states (online/offline) will no longer rely on the udev rule but will be handled through a VM control daemon running inside the VM.
both related PRs are in review: #1104 and #1111
Problem description / Motivation
According to qemu documentation, hot plugging is not supported on arm. Marking cpu as online/offline is supported. We need to change acpi scripts used on x86_64 for hot plugging to support online/offline cpus on arm.
https://docs.kernel.org/next/arch/arm64/cpu-hotplug.html
https://www.qemu.org/docs/master/system/cpu-hotplug.html
Feature idea(s) / DoD
Implementation ideas