All of lore.kernel.org
 help / color / mirror / Atom feed
From: Dor Laor <dlaor@redhat.com>
To: Gordan Bobic <gordan@bobich.net>
Cc: kvm@vger.kernel.org
Subject: Re: KSM For All Via LD_PRELOAD?
Date: Wed, 09 Jun 2010 11:33:12 +0300	[thread overview]
Message-ID: <4C0F51C8.70802@redhat.com> (raw)
In-Reply-To: <4C0E8F3B.5060501@bobich.net>

On 06/08/2010 09:43 PM, Gordan Bobic wrote:
> Is this plausible?
>
> I'm trying to work out if it's even worth considering this approach to
> enable all memory used by in a system to be open to KSM page merging,
> rather than only memory used by specific programs aware of it (e.g.
> kvm/qemu).
>
> Something like this would address the fact that container based
> virtualization (OpenVZ, VServer, LXC) cannot benefit from KSM.
>
> What I'm thinking about is somehow intercepting malloc() and wrapping it
> so that all malloc()-ed memory gets madvise()-d as well.
>
> Has this been done?
>
> Or is this too crazy an idea?

It should work. Note that the the malloced memory should be aligned in 
order to get better sharing.

>
> Gordan
> --
> To unsubscribe from this list: send the line "unsubscribe kvm" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html


  reply	other threads:[~2010-06-09  8:31 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-06-08 18:43 KSM For All Via LD_PRELOAD? Gordan Bobic
2010-06-09  8:33 ` Dor Laor [this message]
2010-06-09  8:56   ` Paolo Bonzini
2010-06-09 10:31     ` Gordan Bobic
2010-06-10  7:33       ` Dor Laor
2010-06-10  9:03         ` Gordan Bobic
2010-06-10  7:44 ` Jes Sorensen
2010-06-10  9:09   ` Gordan Bobic
2010-06-10 11:27     ` Jes Sorensen

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=4C0F51C8.70802@redhat.com \
    --to=dlaor@redhat.com \
    --cc=gordan@bobich.net \
    --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.