All of lore.kernel.org
 help / color / mirror / Atom feed
From: Izik Eidus <ieidus@redhat.com>
To: Brian Jackson <iggy@theiggy.com>
Cc: kvm@vger.kernel.org
Subject: Re: kvm userspace: ksm support
Date: Mon, 03 Aug 2009 21:09:38 +0300	[thread overview]
Message-ID: <4A7727E2.4060906@redhat.com> (raw)
In-Reply-To: <200908031308.24804.iggy@theiggy.com>

Brian Jackson wrote:
> If someone wanted to play around with ksm in qemu-kvm-0.x.x would it be as 
> simple as adding the below additions to kvm_setup_guest_memory in kvm-all.c

qemu-kvm-0.x.x doesnt tell me much, but if it is the function that 
register the memory than yes...

(I just remember that qemu used to have something called phys_ram_base, 
in that case it would be just making madvise on phys_ram_base with the 
same of phys_ram_size....)

>  
> (and adding the necessary kernel changes of course)?
>
>
> On Tuesday 28 July 2009 11:39:59 am Izik Eidus wrote:
>   
>> This patch is not for inclusion just rfc.
>>
>> Thanks.
>>
>>
>> From 1297b86aa257100b3d819df9f9f0932bf4f7f49d Mon Sep 17 00:00:00 2001
>> From: Izik Eidus <ieidus@redhat.com>
>> Date: Tue, 28 Jul 2009 19:14:26 +0300
>> Subject: [PATCH] kvm userspace: ksm support
>>
>> rfc for ksm support to kvm userpsace.
>>
>> thanks
>>
>> Signed-off-by: Izik Eidus <ieidus@redhat.com>
>> ---
>>  exec.c |    3 +++
>>  1 files changed, 3 insertions(+), 0 deletions(-)
>>
>> diff --git a/exec.c b/exec.c
>> index f6d9ec9..375cc18 100644
>> --- a/exec.c
>> +++ b/exec.c
>> @@ -2595,6 +2595,9 @@ ram_addr_t qemu_ram_alloc(ram_addr_t size)
>>      new_block->host = file_ram_alloc(size, mem_path);
>>      if (!new_block->host) {
>>          new_block->host = qemu_vmalloc(size);
>> +#ifdef MADV_MERGEABLE
>> +        madvise(new_block->host, size, MADV_MERGEABLE);
>> +#endif
>>      }
>>      new_block->offset = last_ram_offset;
>>      new_block->length = size;
>>     


  reply	other threads:[~2009-08-03 18:11 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-07-28 16:39 kvm userspace: ksm support Izik Eidus
2009-07-28 16:41 ` Anthony Liguori
2009-07-28 16:50   ` Izik Eidus
2009-07-29  1:27     ` Anthony Liguori
2009-07-29  8:51       ` Jan Kiszka
2009-07-29  9:30       ` Avi Kivity
2009-08-03 18:08 ` Brian Jackson
2009-08-03 18:09   ` Izik Eidus [this message]
2009-08-03 18:37     ` Brian Jackson
2009-08-03 19:04       ` Izik Eidus
2009-08-05 18:38         ` Brian Jackson

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=4A7727E2.4060906@redhat.com \
    --to=ieidus@redhat.com \
    --cc=iggy@theiggy.com \
    --cc=kvm@vger.kernel.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.