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:
Marc Zyngier
2014-04-24 18:10:04 +01:00
committed by Will Deacon
parent b4d9ac641b
commit cdd823c4ce
+1 -1
View File
@@ -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))