forked from kata-containers/kata-containers
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Subject: [PATCH] qemu: arm64: Don't detect gic version by /proc/inter…
…rupts [ port from runtime repository commit 4d4a153 ] 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 Signed-off-by: Jia He <[email protected]> Signed-off-by: Peng Tao <[email protected]>
- Loading branch information
Showing
1 changed file
with
10 additions
and
75 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters