From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:57443) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1S0bku-00083S-Vt for qemu-devel@nongnu.org; Thu, 23 Feb 2012 11:43:02 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1S0bkt-0006c8-Mw for qemu-devel@nongnu.org; Thu, 23 Feb 2012 11:42:56 -0500 Received: from mail-lpp01m010-f45.google.com ([209.85.215.45]:35593) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1S0bkt-0006bo-Do for qemu-devel@nongnu.org; Thu, 23 Feb 2012 11:42:55 -0500 Received: by lahi5 with SMTP id i5so1819919lah.4 for ; Thu, 23 Feb 2012 08:42:54 -0800 (PST) MIME-Version: 1.0 In-Reply-To: <1333613dbb15f2b736394d77e795223e.squirrel@ssl.dlh.net> References: <1333613dbb15f2b736394d77e795223e.squirrel@ssl.dlh.net> Date: Thu, 23 Feb 2012 16:42:54 +0000 Message-ID: From: Stefan Hajnoczi Content-Type: text/plain; charset=ISO-8859-1 Subject: Re: [Qemu-devel] linux guests and ksm performance List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Peter Lieven Cc: qemu-devel@nongnu.org, kvm@vger.kernel.org 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 :). Stefan