[prev in list] [next in list] [prev in thread] [next in thread] 

List:       xen-devel
Subject:    Re: [Xen-devel] [PATCH 3 of 7] xenpaging: remove srand call
From:       Patrick Colp <pjcolp () cs ! ubc ! ca>
Date:       2011-03-31 18:37:55
Message-ID: AANLkTikB-OcCH=oM+rPw4vKw2hLnMz8iUFLkUBxW9=VX () mail ! gmail ! com
[Download RAW message or body]

On 31 March 2011 11:17, Olaf Hering <olaf@aepfle.de> wrote:
> On Thu, Mar 31, Patrick Colp wrote:
>
>> On 31 March 2011 10:36, Olaf Hering <olaf@aepfle.de> wrote:
>> > # HG changeset patch
>> > # User Olaf Hering <olaf@aepfle.de>
>> > # 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.


Patrick


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

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

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic