Commit-ID: 18ad50d58cbe8701f4c8edbc8166b0d6e2849b0c Gitweb: http://git.kernel.org/tip/18ad50d58cbe8701f4c8edbc8166b0d6e2849b0c Author: Marc Zyngier <marc.zyngier@xxxxxxx> AuthorDate: Thu, 24 Apr 2014 18:10:04 +0100 Committer: Pekka Enberg <penberg@xxxxxxxxxx> CommitDate: Fri, 25 Apr 2014 15:45:25 +0300 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@xxxxxxx> Signed-off-by: Marc Zyngier <marc.zyngier@xxxxxxx> Signed-off-by: Pekka Enberg <penberg@xxxxxxxxxx> --- tools/kvm/arm/kvm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/kvm/arm/kvm.c b/tools/kvm/arm/kvm.c index d0d64ff..58ad9fa 100644 --- a/tools/kvm/arm/kvm.c +++ b/tools/kvm/arm/kvm.c @@ -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)) -- To unsubscribe from this list: send the line "unsubscribe linux-tip-commits" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html
![]() |