Commit-ID: 7ba127ff0905ef6f6abb5cab378ec28cd03a49ef Gitweb: http://git.kernel.org/tip/7ba127ff0905ef6f6abb5cab378ec28cd03a49ef Author: Sasha Levin <levinsasha928@xxxxxxxxx> AuthorDate: Sun, 3 Jul 2011 02:52:09 +0300 Committer: Pekka Enberg <penberg@xxxxxxxxxx> CommitDate: Sat, 2 Jul 2011 13:07:45 +0300 kvm tools: Advise memory allocated for guest RAM as KSM mergable Signed-off-by: Sasha Levin <levinsasha928@xxxxxxxxx> Signed-off-by: Pekka Enberg <penberg@xxxxxxxxxx> --- tools/kvm/kvm.c | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) diff --git a/tools/kvm/kvm.c b/tools/kvm/kvm.c index 23d31a3..2f5d633 100644 --- a/tools/kvm/kvm.c +++ b/tools/kvm/kvm.c @@ -346,6 +346,8 @@ struct kvm *kvm__init(const char *kvm_dev, u64 ram_size, const char *name) if (kvm->ram_start == MAP_FAILED) die("out of memory"); + madvise(kvm->ram_start, kvm->ram_size, MADV_MERGEABLE); + ret = ioctl(kvm->vm_fd, KVM_CREATE_IRQCHIP); if (ret < 0) die_perror("KVM_CREATE_IRQCHIP ioctl"); -- 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
![]() |