From mboxrd@z Thu Jan 1 00:00:00 1970 From: Dor Laor Subject: Re: KSM For All Via LD_PRELOAD? Date: Wed, 09 Jun 2010 11:33:12 +0300 Message-ID: <4C0F51C8.70802@redhat.com> References: <4C0E8F3B.5060501@bobich.net> Reply-To: dlaor@redhat.com Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: kvm@vger.kernel.org To: Gordan Bobic Return-path: Received: from mx1.redhat.com ([209.132.183.28]:29352 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756918Ab0FIIbq (ORCPT ); Wed, 9 Jun 2010 04:31:46 -0400 In-Reply-To: <4C0E8F3B.5060501@bobich.net> Sender: kvm-owner@vger.kernel.org List-ID: 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