mirror of
https://github.com/kata-containers/kata-containers.git
synced 2025-08-09 03:48:05 +00:00
scripts: improve configure-hypervisor.sh
Change weird condition to check qemu >=3.1 Add comment explaining the malloc-trim option. fixes #462 Signed-off-by: Julio Montes <julio.montes@intel.com>
This commit is contained in:
parent
b5eaf1f847
commit
c0f0fc9f9b
@ -304,7 +304,7 @@ generate_qemu_options() {
|
|||||||
# implicitly enabled in Fedora 27).
|
# implicitly enabled in Fedora 27).
|
||||||
qemu_options+=(size:--disable-linux-aio)
|
qemu_options+=(size:--disable-linux-aio)
|
||||||
|
|
||||||
if [[ "${qemu_version_major}" -ge 4 || ( "${qemu_version_major}" -ge 3 && "${qemu_version_minor}" -ge 1 ) ]]; then
|
if [[ "${qemu_version_major}" -ge 4 || ( "${qemu_version_major}" -eq 3 && "${qemu_version_minor}" -ge 1 ) ]]; then
|
||||||
# Disable libpmem, vNVDIMM backend (aka rootfs image) shouldn't be modifed
|
# Disable libpmem, vNVDIMM backend (aka rootfs image) shouldn't be modifed
|
||||||
# by the guest
|
# by the guest
|
||||||
qemu_options+=(security:--disable-libpmem)
|
qemu_options+=(security:--disable-libpmem)
|
||||||
@ -361,9 +361,10 @@ generate_qemu_options() {
|
|||||||
qemu_options+=(functionality:--enable-attr)
|
qemu_options+=(functionality:--enable-attr)
|
||||||
qemu_options+=(functionality:--enable-cap-ng)
|
qemu_options+=(functionality:--enable-cap-ng)
|
||||||
|
|
||||||
# AVX2 is enabled by default, make sure it's on
|
if [[ "${qemu_version_major}" -ge 4 || ( "${qemu_version_major}" -eq 3 && "${qemu_version_minor}" -ge 1 ) ]]; then
|
||||||
if [[ "${qemu_version_major}" -ge 4 || ( "${qemu_version_major}" -ge 3 && "${qemu_version_minor}" -ge 1 ) ]]; then
|
# AVX2 is enabled by default, make sure it's on.
|
||||||
qemu_options+=(speed:--enable-avx2)
|
qemu_options+=(speed:--enable-avx2)
|
||||||
|
# Enable libc malloc_trim() for memory optimization.
|
||||||
qemu_options+=(speed:--enable-malloc-trim)
|
qemu_options+=(speed:--enable-malloc-trim)
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user