WARNING - OLD ARCHIVES

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/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

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

To: xen-devel@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-devel] [PATCH 3 of 7] xenpaging: remove srand call
From: Olaf Hering <olaf@xxxxxxxxx>
Date: Thu, 31 Mar 2011 19:36:20 +0200
Delivery-date: Thu, 31 Mar 2011 10:38:55 -0700
Dkim-signature: v=1; a=rsa-sha1; c=relaxed/relaxed; t=1301592981; l=813; s=domk; d=aepfle.de; h=To:From:Date:References:In-Reply-To:Subject: Content-Transfer-Encoding:MIME-Version:Content-Type:X-RZG-CLASS-ID: X-RZG-AUTH; bh=q4bu2208gQ8XhsXW43fHUWfQ+mg=; b=LegLRvSacsv/MKYlQUo9ZjkuZ3DfF3ltWXpHHM5dap8hTPGI1aU9VeewIowji2Rwvck 9h7IeYmTadvTDagzNHbDaXggl3jholl4/OyezvM3BZS9EydQJfIn4H2Cv0DZWH/Jj80JG WOIpplQw5VA0OCPoeSIRy5cYEyQgzX2M92s=
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <patchbomb.1301592977@localhost>
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>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Mercurial-patchbomb/1.8
# 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().

Signed-off-by: Olaf Hering <olaf@xxxxxxxxx>

diff -r a811d86a48f4 -r cd35892de8ff tools/xenpaging/xenpaging.c
--- a/tools/xenpaging/xenpaging.c       Thu Mar 31 19:11:57 2011 +0200
+++ b/tools/xenpaging/xenpaging.c       Thu Mar 31 19:12:50 2011 +0200
@@ -544,9 +544,6 @@
     domain_id = atoi(argv[1]);
     num_pages = atoi(argv[2]);
 
-    /* Seed random-number generator */
-    srand(time(NULL));
-
     /* Initialise domain paging */
     paging = xenpaging_init(domain_id);
     if ( paging == NULL )

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel