diff options
author | Marc Zyngier <marc.zyngier@arm.com> | 2014-04-24 18:10:04 +0100 |
---|---|---|
committer | Will Deacon <will.deacon@arm.com> | 2015-06-01 16:39:55 +0100 |
commit | cdd823c4ce760a4af7420f0ddf6d565c219a0dcf (patch) | |
tree | 1e270622c1ea18cf1808fbe41dde61ffe3301b96 | |
parent | b4d9ac641b07294d99305242b3fada88eb37065d (diff) | |
download | kvmtool-cdd823c4ce760a4af7420f0ddf6d565c219a0dcf.tar.gz |
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>
-rw-r--r-- | arm/kvm.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -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)) |