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

On 31 March 2011 11:17, Olaf Hering <olaf@xxxxxxxxx> wrote:
> 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.

Yeah, I saw that. Is it actually possible to run out of pages to
nominate? I would think the only way this would happen is if you
specified that 100% of the guest memory is paged out. If it is
possible, then would it maybe be better to add a check to the random
policy to detect when it's tried all the pages? Of course, if linear
performs just as well (or poorly) as random, then there's no point
changing it from what it is now.


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

Xen-devel mailing list