[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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



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?


Patrick


>
> 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
>
>

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


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.