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 v2 7/8] kvm tools: Advise memory allocated for guest RAM as KSM mergable
Date: Sun, 3 Jul 2011 02:52:09 +0300 [thread overview]
Message-ID: <1309650731-5796-7-git-send-email-levinsasha928@gmail.com> (raw)
In-Reply-To: <1309650731-5796-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 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");
--
1.7.6
next prev parent reply other threads:[~2011-07-02 0:00 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-07-02 23:52 [PATCH v2 1/8] kvm tools: Don't dynamically allocate threadpool jobs Sasha Levin
2011-07-02 23:52 ` [PATCH v2 2/8] kvm tools: Process virtio-blk requests in parallel Sasha Levin
2011-07-02 23:52 ` [PATCH v2 3/8] kvm tools: Allow giving instance names Sasha Levin
2011-07-02 23:52 ` [PATCH v2 4/8] kvm tools: Provide instance name when running 'kvm debug' Sasha Levin
2011-07-02 23:52 ` [PATCH v2 5/8] kvm tools: Provide instance name when running 'kvm pause' Sasha Levin
2011-07-02 23:52 ` [PATCH v2 6/8] kvm tools: Add virtio-balloon device Sasha Levin
2011-07-02 23:52 ` Sasha Levin [this message]
2011-07-02 23:52 ` [PATCH v2 8/8] kvm tools: Add 'kvm balloon' command Sasha Levin
2011-07-02 23:52 ` [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=1309650731-5796-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