This repository has been archived by the owner on May 12, 2021. It is now read-only.
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
qemu: arm64: Don't detect gic version by /proc/interrupts
Commit b438590 ("qemu/arm64: Detect host GIC version to configure guest GIC") reads /proc/interrupts to detect the host gic version. But on a ThunderX2 host with 224 cpus, the /proc/interrupts is ~762K bytes. Hence it will costs ~900K bytes memory overhead. From the go tool pprof results: flat flat% sum% cum cum% 976.89kB 100% 100% 976.89kB 100% github.com/kata-containers/runtime/virtcontainers.getHostGICVersion Although the allocated memory will be freed, seems it worthy removing that for speed up the runtime. As per [1], there is no perfect way to detect the gic version on host. At qemu side, if we use "gic-version=host", qemu will automatically detect the verion by kvm ioctl. So we'd better let qemu determine the gic version. If the user really want to start vm with gic-verion=2, he/she can set it in machine_accelerators option. [1]https://lists.cs.columbia.edu/pipermail/kvmarm/2014-October/011690.html Fixes: #2614 Signed-off-by: Jia He <[email protected]>
- Loading branch information