From mboxrd@z Thu Jan 1 00:00:00 1970 From: Avi Kivity Subject: Re: linux guests and ksm performance Date: Tue, 28 Feb 2012 15:14:07 +0200 Message-ID: <4F4CD31F.6000302@redhat.com> References: <1333613dbb15f2b736394d77e795223e.squirrel@ssl.dlh.net> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: Peter Lieven , qemu-devel@nongnu.org, kvm@vger.kernel.org To: Stefan Hajnoczi Return-path: Received: from mx1.redhat.com ([209.132.183.28]:42724 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754129Ab2B1NOQ (ORCPT ); Tue, 28 Feb 2012 08:14:16 -0500 In-Reply-To: Sender: kvm-owner@vger.kernel.org List-ID: On 02/23/2012 06:42 PM, Stefan Hajnoczi wrote: > On Thu, Feb 23, 2012 at 3:40 PM, Peter Lieven wrote: > > However, in a virtual machine I have not observed the above slow down to > > that extend > > while the benefit of zero after free in a virtualisation environment is > > obvious: > > > > 1) zero pages can easily be merged by ksm or other technique. > > 2) zero (dup) pages are a lot faster to transfer in case of migration. > > The other approach is a memory page "discard" mechanism - which > obviously requires more code changes than zeroing freed pages. > > The advantage is that we don't take the brute-force and CPU intensive > approach of zeroing pages. It would be like a fine-grained ballooning > feature. > > I hope someone will follow up saying this has already been done or > prototyped :). It already exists - that's the balloon code. Right now it's host driven, but maybe we can modify it to allow the guest to initiate balloon inflations. -- error compiling committee.c: too many arguments to function