From mboxrd@z Thu Jan 1 00:00:00 1970 From: Olaf Hering Subject: Re: [PATCH 3 of 7] xenpaging: remove srand call Date: Thu, 31 Mar 2011 20:17:49 +0200 Message-ID: <20110331181749.GA25674@aepfle.de> References: Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Return-path: Content-Disposition: inline In-Reply-To: List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: Patrick Colp Cc: xen-devel@lists.xensource.com List-Id: xen-devel@lists.xenproject.org On Thu, Mar 31, Patrick Colp wrote: > On 31 March 2011 10:36, Olaf Hering wrote: > > # HG changeset patch > > # User Olaf Hering > > # Date 1301591570 -7200 > > # Node ID cd35892de8ff2388aa46e3768393f217a3c63521 > > # Parent =C2=A0a811d86a48f400cd541500e0e6ae765fdcd02ef9 > > xenpaging: remove srand call > > > > The policy uses now a linear algorithm instead of picking random gfn > > numbers. =C2=A0Remove the call to srand(). >=20 > Is a linear algorithm better than random? The current linear policy can detects when no more pages can be nominated. The previous random policy would instead just try forever with random numbers, and never find an end. Olaf