From: Christian =?utf-8?q?Borntr=C3=A4ger?= Subject: Re: [PATCH v2] Driver for Inter-VM shared memory device for KVM supporting interrupts. Date: Wed, 20 May 2009 11:20:52 +0200 Message-ID: <200905201120.53029.christian@borntraeger.net> References: <1241713567-17256-1-git-send-email-cam@cs.ualberta.ca> <200905201107.00930.borntraeger@de.ibm.com> <4A13C95D.1020402@redhat.com> Mime-Version: 1.0 Content-Type: Text/Plain; charset="utf-8" Content-Transfer-Encoding: 7bit Cc: Christian =?utf-8?q?Borntr=C3=A4ger?= , Rusty Russell , Cam Macdonell , kvm@vger.kernel.org, Christian Ehrhardt , Anthony Liguori To: Avi Kivity Return-path: Received: from mtagate3.de.ibm.com ([195.212.29.152]:47063 "EHLO mtagate3.de.ibm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756174AbZETJU7 (ORCPT ); Wed, 20 May 2009 05:20:59 -0400 Received: from d12nrmr1607.megacenter.de.ibm.com (d12nrmr1607.megacenter.de.ibm.com [9.149.167.49]) by mtagate3.de.ibm.com (8.14.3/8.13.8) with ESMTP id n4K9Ksrn216816 for ; Wed, 20 May 2009 09:20:54 GMT Received: from d12av02.megacenter.de.ibm.com (d12av02.megacenter.de.ibm.com [9.149.165.228]) by d12nrmr1607.megacenter.de.ibm.com (8.13.8/8.13.8/NCO v9.2) with ESMTP id n4K9KsHv2941074 for ; Wed, 20 May 2009 11:20:54 +0200 Received: from d12av02.megacenter.de.ibm.com (loopback [127.0.0.1]) by d12av02.megacenter.de.ibm.com (8.12.11.20060308/8.13.3) with ESMTP id n4K9Kr2j011914 for ; Wed, 20 May 2009 11:20:54 +0200 In-Reply-To: <4A13C95D.1020402@redhat.com> Content-Disposition: inline Sender: kvm-owner@vger.kernel.org List-ID: Am Mittwoch 20 Mai 2009 11:11:57 schrieb Avi Kivity: > > Yes, KSM is easier and it even finds duplicate data pages. > > On the other hand it does only provide memory saving. It does not speedup > > application startup like execute-in-place (major page faults become minor > > page faults for text pages if the page is already backed by the host) I > > am not claiming that KSM is useless. Depending on the scenario you might > > want the one or the other or even both. For typical desktop use, KSM is > > very likely the better approach > > If ksm shares pagecache, then doesn't it become effectively XIP? Not exactly, only for long running guests with stable working set. If the guest boots up, its page cache is basically empty, but the shared segment is populated. its the startup where xip wins. Same is true for guests with quickly changing working sets. > We could also hook virtio dma to preemptively share pages somehow. Yes, that is something to think about. One idea that is used on z/VM by lot of customers is to have a shared disk read-only for /usr that is cached by the host.