This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
Home Products Support Community News


Re: [Xen-devel] [PATCH 3 of 7] xenpaging: remove srand call

To: Patrick Colp <pjcolp@xxxxxxxxx>
Subject: Re: [Xen-devel] [PATCH 3 of 7] xenpaging: remove srand call
From: Olaf Hering <olaf@xxxxxxxxx>
Date: Thu, 31 Mar 2011 20:17:49 +0200
Cc: xen-devel@xxxxxxxxxxxxxxxxxxx
Delivery-date: Thu, 31 Mar 2011 11:18:48 -0700
Dkim-signature: v=1; a=rsa-sha1; c=relaxed/relaxed; t=1301595470; l=706; s=domk; d=aepfle.de; h=In-Reply-To:Content-Transfer-Encoding:Content-Type:MIME-Version: References:Subject:Cc:To:From:Date:X-RZG-CLASS-ID:X-RZG-AUTH; bh=tjjYXMAUke1++dfga65i2rn5bM8=; b=p6XdqR1+Ww2G+KL8zCMvgwRLXXh1yJyRTFB786TVsrrC6E288FdNt4ugEsYnO9L11V6 TbPvJZL1tB0VPxrP9jPB0ZqAj2dVn037uDVuf8HG6vLPwl19rmHP+fkg+Vt4Nej5t6zyP MpeLAtFJOnCXRg9KZkabDhruyu2QxdSwcNU=
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <AANLkTikuR1S0bkYshBC7sWY_L8Gz1Oi+Q3vN3J1s=1dZ@xxxxxxxxxxxxxx>
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
References: <patchbomb.1301592977@localhost> <cd35892de8ff2388aa46.1301592980@localhost> <AANLkTikuR1S0bkYshBC7sWY_L8Gz1Oi+Q3vN3J1s=1dZ@xxxxxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Mutt/1.5.21 (2010-09-15)
On Thu, Mar 31, Patrick Colp wrote:

> On 31 March 2011 10:36, Olaf Hering <olaf@xxxxxxxxx> wrote:
> > # HG changeset patch
> > # User Olaf Hering <olaf@xxxxxxxxx>
> > # Date 1301591570 -7200
> > # Node ID cd35892de8ff2388aa46e3768393f217a3c63521
> > # Parent  a811d86a48f400cd541500e0e6ae765fdcd02ef9
> > xenpaging: remove srand call
> >
> > The policy uses now a linear algorithm instead of picking random gfn
> > numbers.  Remove the call to srand().
> 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.


Xen-devel mailing list