From mboxrd@z Thu Jan 1 00:00:00 1970 From: Izik Eidus Subject: Re: KSM Algorithm Date: Thu, 10 Jul 2008 08:40:33 -0500 Message-ID: <48761151.20904@qumranet.com> References: <4875D47E.603@qumranet.com> <4875E80E.3020305@qumranet.com> <487660E8.504@qumranet.com> 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-2.exch011.intermedia.net ([64.78.21.129]:13390 "EHLO mis011-2.exch011.intermedia.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753392AbYGJNkh (ORCPT ); Thu, 10 Jul 2008 09:40:37 -0400 In-Reply-To: Sender: kvm-owner@vger.kernel.org List-ID: =D7=A6=D7=99=D7=98=D7=95=D7=98 Sukanto Ghosh: > One more query, what if multiple processes call ioctl KSM_CREATE_SCAN > ? Will there be multiple scanners ? > =20 yes > Consider a scenario where two processes A & B separately call > KSM_CREATE_SCAN and then start registering some memory pages/areas vi= a > KSM_CREATE_SHARED_MEMORY_AREA ioctl. > Lets say A registers 4 pages having content X, Y, Z and X . And, > process B registers 2 pages having content Z and X. > So, will there be only single copy each of X, Y and Z in the entire > system or will they be kept separately i.e the scanner for A maintain= s > X, Y, Z single copy each and scanner for B maintains X and Z > separately. > =20 there will be only one copy, ksm is multi threaded safe. > > =20