mirror of
https://github.com/clearlinux/kvmtool.git
synced 2026-08-19 11:56:28 +00:00
kvmtool: ARM: pass MADV_HUGEPAGE to madvise
If the host kernel is configured with CONFIG_TRANSPARENT_HUGEPAGE_MADVISE, it is important to madvise(MADV_HUGEPAGE) the memory region. Otherwise, the guest won't benefit from using THP. Acked-by: Will Deacon <will.deacon@arm.com> Signed-off-by: Marc Zyngier <marc.zyngier@arm.com> Signed-off-by: Pekka Enberg <penberg@kernel.org>
This commit is contained in:
committed by
Will Deacon
parent
b4d9ac641b
commit
cdd823c4ce
@@ -79,7 +79,7 @@ void kvm__arch_init(struct kvm *kvm, const char *hugetlbfs_path, u64 ram_size)
|
||||
SZ_2M);
|
||||
|
||||
madvise(kvm->arch.ram_alloc_start, kvm->arch.ram_alloc_size,
|
||||
MADV_MERGEABLE);
|
||||
MADV_MERGEABLE | MADV_HUGEPAGE);
|
||||
|
||||
/* Initialise the virtual GIC. */
|
||||
if (gic__init_irqchip(kvm))
|
||||
|
||||
Reference in New Issue
Block a user