From: Ian Campbell <ian.campbell@citrix.com>
To: Mike Latimer <mlatimer@suse.com>
Cc: wei.liu2@citrix.com,
Stefano Stabellini <stefano.stabellini@eu.citrix.com>,
ian.jackson@eu.citrix.com, xen-devel@lists.xen.org
Subject: Re: freemem-slack and large memory environments
Date: Fri, 27 Feb 2015 10:21:05 +0000 [thread overview]
Message-ID: <1425032465.14641.145.camel@citrix.com> (raw)
In-Reply-To: <1614208.FAtanMl2ZW@mlatimer1.dnsdhcp.provo.novell.com>
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.
next prev parent reply other threads:[~2015-02-27 10:21 UTC|newest]
Thread overview: 41+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-02-10 1:27 freemem-slack and large memory environments Mike Latimer
2015-02-10 21:34 ` Mike Latimer
2015-02-13 11:13 ` Wei Liu
2015-02-13 23:16 ` Mike Latimer
2015-02-18 14:10 ` Ian Campbell
2015-02-24 16:06 ` Stefano Stabellini
2015-02-24 16:54 ` Ian Campbell
2015-02-25 11:39 ` Stefano Stabellini
2015-02-25 12:00 ` Ian Campbell
2015-02-25 14:03 ` Ian Campbell
2015-02-25 14:09 ` Stefano Stabellini
2015-02-26 15:36 ` Mike Latimer
2015-02-26 15:57 ` Ian Campbell
2015-02-26 17:38 ` Mike Latimer
2015-02-26 17:47 ` Ian Campbell
2015-02-26 20:38 ` Mike Latimer
2015-02-27 10:17 ` Ian Campbell
2015-02-27 11:05 ` Stefano Stabellini
2015-02-26 17:53 ` Stefano Stabellini
2015-02-26 20:45 ` Mike Latimer
2015-02-26 23:30 ` Mike Latimer
2015-02-27 10:21 ` Ian Campbell [this message]
2015-02-27 10:52 ` Stefano Stabellini
2015-02-27 15:28 ` Mike Latimer
2015-02-27 18:29 ` Mike Latimer
2015-02-28 0:31 ` Mike Latimer
2015-03-02 10:12 ` Stefano Stabellini
2015-03-02 10:44 ` Jan Beulich
2015-03-02 12:13 ` Stefano Stabellini
2015-03-02 13:04 ` Jan Beulich
[not found] ` <54F46DDB020000780006505B@suse.com>
2015-03-02 22:49 ` Mike Latimer
2015-03-02 11:42 ` Ian Campbell
2015-03-02 15:19 ` Stefano Stabellini
2015-03-02 16:04 ` Ian Campbell
2015-03-02 16:15 ` Stefano Stabellini
2015-03-02 22:49 ` Mike Latimer
2015-03-03 10:02 ` Ian Campbell
2015-03-03 10:32 ` Stefano Stabellini
2015-03-03 10:40 ` Stefano Stabellini
2015-02-27 8:24 ` Jan Beulich
2015-02-27 10:52 ` Stefano Stabellini
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1425032465.14641.145.camel@citrix.com \
--to=ian.campbell@citrix.com \
--cc=ian.jackson@eu.citrix.com \
--cc=mlatimer@suse.com \
--cc=stefano.stabellini@eu.citrix.com \
--cc=wei.liu2@citrix.com \
--cc=xen-devel@lists.xen.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.