render / rpms / qemu

Forked from rpms/qemu 9 months ago
Clone

Blame qemu-add-ksm-support.patch

Mark McLoughlin fc7c34
From 511a4f5ab30a36fdaa48fb0d146cfc3f123b4f0a Mon Sep 17 00:00:00 2001
Mark McLoughlin fc7c34
From: Izik Eidus <ieidus@redhat.com>
Mark McLoughlin fc7c34
Date: Tue, 28 Jul 2009 19:14:26 +0300
Mark McLoughlin fc7c34
Subject: [PATCH] kvm userspace: ksm support
Mark McLoughlin fc7c34
Mark McLoughlin fc7c34
rfc for ksm support to kvm userpsace.
Mark McLoughlin fc7c34
Mark McLoughlin fc7c34
Signed-off-by: Izik Eidus <ieidus@redhat.com>
Mark McLoughlin fc7c34
Signed-off-by: Mark McLoughlin <markmc@redhat.com>
Mark McLoughlin fc7c34
Fedora-patch: qemu-add-ksm-support.patch
Mark McLoughlin fc7c34
---
Mark McLoughlin fc7c34
 exec.c |    3 +++
Mark McLoughlin fc7c34
 1 files changed, 3 insertions(+), 0 deletions(-)
Mark McLoughlin fc7c34
Mark McLoughlin fc7c34
diff --git a/exec.c b/exec.c
Mark McLoughlin fc7c34
index 2134697..88bcff5 100644
Mark McLoughlin fc7c34
--- a/exec.c
Mark McLoughlin fc7c34
+++ b/exec.c
Mark McLoughlin fc7c34
@@ -2578,6 +2578,9 @@ ram_addr_t qemu_ram_alloc(ram_addr_t size)
Mark McLoughlin fc7c34
     new_block->host = file_ram_alloc(size, mem_path);
Mark McLoughlin fc7c34
     if (!new_block->host) {
Mark McLoughlin fc7c34
         new_block->host = qemu_vmalloc(size);
Mark McLoughlin fc7c34
+#ifdef MADV_MERGEABLE
Mark McLoughlin fc7c34
+        madvise(new_block->host, size, MADV_MERGEABLE);
Mark McLoughlin fc7c34
+#endif
Mark McLoughlin fc7c34
     }
Mark McLoughlin fc7c34
     new_block->offset = last_ram_offset;
Mark McLoughlin fc7c34
     new_block->length = size;
Mark McLoughlin fc7c34
-- 
Mark McLoughlin fc7c34
1.6.2.5
Mark McLoughlin fc7c34