From: Sasha Levin <levinsasha928@gmail.com>
To: penberg@kernel.org
Cc: kvm@vger.kernel.org, mingo@elte.hu, asias.hejun@gmail.com,
gorcunov@gmail.com, prasadjoshi124@gmail.com,
Sasha Levin <levinsasha928@gmail.com>
Subject: [PATCH 7/9] kvm tools: Advise memory allocated for guest RAM as KSM mergable
Date: Wed, 29 Jun 2011 14:02:16 -0400 [thread overview]
Message-ID: <1309370538-7947-7-git-send-email-levinsasha928@gmail.com> (raw)
In-Reply-To: <1309370538-7947-1-git-send-email-levinsasha928@gmail.com>
Signed-off-by: Sasha Levin <levinsasha928@gmail.com>
---
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 4f723a6..15bcf08 100644
--- a/tools/kvm/kvm.c
+++ b/tools/kvm/kvm.c
@@ -345,6 +345,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");
--
1.7.6
next prev parent reply other threads:[~2011-06-29 18:04 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-06-29 18:02 [PATCH 1/9] kvm tools: Don't dynamically allocate threadpool jobs Sasha Levin
2011-06-29 18:02 ` [PATCH 2/9] kvm tools: Process virtio-blk requests in parallel Sasha Levin
2011-06-29 18:02 ` [PATCH 3/9] kvm tools: Allow giving instance names Sasha Levin
2011-06-30 7:53 ` Pekka Enberg
2011-06-30 8:30 ` Avi Kivity
2011-06-30 15:00 ` Sasha Levin
2011-06-30 15:03 ` Avi Kivity
2011-06-30 15:03 ` Sasha Levin
2011-06-29 18:02 ` [PATCH 4/9] kvm tools: Provide instance name when running 'kvm debug' Sasha Levin
2011-06-29 18:02 ` [PATCH 5/9] kvm tools: Provide instance name when running 'kvm pause' Sasha Levin
2011-06-29 18:02 ` [PATCH 6/9] kvm tools: Add virtio-balloon device Sasha Levin
2011-06-29 18:02 ` Sasha Levin [this message]
2011-06-29 18:02 ` [PATCH 8/9] kvm tools: Add 'kvm balloon' command Sasha Levin
2011-06-29 18:02 ` [PATCH 9/9] kvm tools: Stop VCPUs before freeing struct kvm Sasha Levin
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1309370538-7947-7-git-send-email-levinsasha928@gmail.com \
--to=levinsasha928@gmail.com \
--cc=asias.hejun@gmail.com \
--cc=gorcunov@gmail.com \
--cc=kvm@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=penberg@kernel.org \
--cc=prasadjoshi124@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox