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

Re: [Xen-devel] freemem-slack and large memory environments



On Thu, 2015-02-26 at 16:30 -0700, Mike Latimer wrote:
> On Thursday, February 26, 2015 01:45:16 PM Mike Latimer wrote:
> > On Thursday, February 26, 2015 05:53:06 PM Stefano Stabellini wrote:
> > > What is the return value of libxl_set_memory_target and
> > > libxl_wait_for_free_memory in that case? Isn't it just a matter of
> > > properly handle the return values?
> > 
> > The return from libxl_set_memory_target is 0, as the assignment works just
> > fine. I don't have the return from libxl_wait_for_free_memory in my notes,
> > so I'll spin up another test and track that down.
> 
> I slightly misspoke here... In my testing, the returns are actually:
> 
>    libxl_set_memory_target = 1
>    libxl_wait_for_free_memory = -5
>    libxl_wait_for_memory_target = 0
>       Note - libxl_wait_for_memory_target is confusing,

Further to the comment I just made WRT this source comment:
        /*
         * WARNING
         * This memory management API is unstable even in Xen 4.2.
         * It has a numer of deficiencies and we intend to replace it.
         *
         * The semantics of these functions should not be relied on to be very
         * coherent or stable.  We will however endeavour to keep working
         * existing programs which use them in roughly the same way as libxl.
         */
        
I think we should feel free to introduce a new interface which has
semantics which we can actually work with. IOW

>  as rc can be set
>       to ERROR_FAIL, but the function returns 0 anyway (unless an error
>       is encountered earlier.) I guess this just means we need to continue
>       to wait...

Do something sensible so there is no more guessing.

I'm not sure yet what "sensible" would be.

One approach to fixing this might be when the replacenent for
libxl_wait_for_memory_target fails it sets the target to whatever was
actually achieved, such that further calculations involving free_memkb
and the overall target will still be valid.

Or we could move the "progress is being made" logic currently in xl's
freemem down into the wait_for_memory_target replacement so it hopefully
has more information available to it in order to make better decisions
about the timeouts.

Ian.


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel


 


Rackspace

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