From mboxrd@z Thu Jan 1 00:00:00 1970 From: Izik Eidus Subject: Re: KSM Algorithm Date: Thu, 10 Jul 2008 04:21:02 -0500 Message-ID: <4875D47E.603@qumranet.com> References: Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: QUOTED-PRINTABLE Cc: kvm@vger.kernel.org To: Sukanto Ghosh Return-path: Received: from mis011.exch011.intermedia.net ([64.78.21.10]:3400 "EHLO mis011.exch011.intermedia.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752294AbYGJJVU (ORCPT ); Thu, 10 Jul 2008 05:21:20 -0400 In-Reply-To: Sender: kvm-owner@vger.kernel.org List-ID: =D7=A6=D7=99=D7=98=D7=95=D7=98 Sukanto Ghosh: > Can anyone answer these queries regarding KSM ? > > How does KSM offers its services through the /dev/ksm device ? > =20 ioctls > Are every guest pages scanned in KVM while using KSM or page-scanning > and sharing is triggered on some event (low memory, etc) ? > =20 no, the scanning run all the time (with number pages to scan and sleep=20 parameters...) > Is sharing done only between the pages which have been registered via > KSM_REGISTER_MEMORY_REGION ? > =20 yes > What are these for ? KSM_CREATE_SHARED_MEMORY_AREA and KSM_CREATE_SCA= N ? > =20 KSM_CREATE_SHARED_MEMORY_AREA - to register memory area to be scanned f= or identical pages KSM_CREATE_SCAN - to create the scanner that scan for this pages > Where are the shared pages kept ? In kernel memory ? Aren't the share= d > pages always pinned in RAM (due to same reasons for pinned shadowed > pages) ? > =20 in the version that was sent to the list it was kernel memory (meaning=20 shared pages are not swappable (just the pages that are shared not the pages that we scan, when they=20 are split beacuse of copy on write it become swappable again new version that i will send soon the pages are normal=20 anonymous/userspace memory that is swappable > How much is the overhead involved due to this ? > =20 depeand on the speed you tell it to scan, but the overhead is about ~5%= =20 for common cases > -- > Regards, > Sukanto Ghosh > -- > 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 > =20