From: Chris Wright Subject: Re: KSM without VT / KSM for all memory Date: Fri, 26 Mar 2010 17:13:41 -0700 Message-ID: <20100327001341.GK1744@sequoia.sous-sol.org> References: <4BACFB68.404@bobich.net> <20100326224659.GJ1744@sequoia.sous-sol.org> <4BAD477D.1060606@bobich.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: KVM list To: Gordan Bobic Return-path: Received: from sous-sol.org ([216.99.217.87]:37465 "EHLO sequoia.sous-sol.org" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751970Ab0C0ANq (ORCPT ); Fri, 26 Mar 2010 20:13:46 -0400 Content-Disposition: inline In-Reply-To: <4BAD477D.1060606@bobich.net> Sender: kvm-owner@vger.kernel.org List-ID: * Gordan Bobic (gordan@bobich.net) wrote: > Chris Wright wrote: >>> 2) For all memory in a system, without patching all applications to >>> register with it >> >> No. >> >> Right now, an app must be modified to call madvise(MADV_MERGEABLE). >> Further, the core scanning loop that ksmd performs is based on per-process >> virtual memory regions rather than physical memory. > > You mean only pages within the same process are de-duplicated? No, de-duplication can span processes. Each process registers some range(s) of its virtual address space with the scanning daemon. The scanning daemon will then search all of the registered memory ranges for duplicates. This is an opt-in thing for each process though. thanks, -chris