All of lore.kernel.org
 help / color / mirror / Atom feed
From: Mike Latimer <mlatimer@suse.com>
To: xen-devel@lists.xen.org
Cc: wei.liu2@citrix.com, ian.jackson@eu.citrix.com,
	Ian Campbell <ian.campbell@citrix.com>,
	Stefano Stabellini <stefano.stabellini@eu.citrix.com>
Subject: Re: freemem-slack and large memory environments
Date: Mon, 02 Mar 2015 15:49:31 -0700	[thread overview]
Message-ID: <1462341.tRHO4kzITu@mlatimer1.dnsdhcp.provo.novell.com> (raw)
In-Reply-To: <alpine.DEB.2.02.1503021607080.23507@kaball.uk.xensource.com>

On Monday, March 02, 2015 04:15:41 PM Stefano Stabellini wrote:
> On Mon, 2 Mar 2015, Ian Campbell wrote:
> > ? "Continue as long as progress is being made" is exactly what
> > 2563bca1154 "libxl: Wait for ballooning if free memory is increasing"
> > was trying to implement, so it certainly was the idea behind the current
> > implementation (it may well not have managed to implement the idea it
> > was trying to).
> 
> I don't think so: pre-2563bca1154 it wasn't and 2563bca1154 doesn't
> implement it properly.  I think we should revert it.

I agree. The intent was there, but we are not aware of any known problem cases 
that the changes will effect. Reverting seems like the right thing to do.

> I agree with the suggestion "continue as long as progress is being
> made". I disagree that "continue as long as progress is being made" is
> the current logic of freemem.
> 
> I don't have an opinion on whether that logic should be implemented in
> freemem or libxl_wait_for_memory_target. The code below implements it in
> libxl_wait_for_memory_target.

Seems like it should wait in libxl_wait_for_memory_target, as you have 
implemented.

> > > The following changes to freemem implements the aforementioned logic by
> > > improving libxl_wait_for_memory_target to keep going as long as dom0 is
> > > able to make progress and removing the useless free_memkb >
> > > free_memkb_prev check.

I just finished testing your changes and they work correctly in my environment. 
An interesting thing to note is that within the 1 second delay in the loop, my 
test machine was ballooning down about 512M. This resulted in the loop being 
executed 127 times in order to balloon down the required 64G. (I'm not sure if 
there is any reason to worry about that though.)

One small question on freemem...  The loop essentially looks like:

  libxl_get_free_memory:  Get free memory
  If free_memkb >= need_memkb, return
  libxl_set_memory_target:  Balloon dom0 to free memory for domU
  libxl_wait_for_free_memory:  Wait for free memory for domU (max 10 seconds)
  libxl_wait_for_memory_target:  Wait for dom0 to finish ballooning
  Decrement retry and try again

Shouldn't libxl_wait_for_memory_target be before libxl_wait_for_free_memory?

Thanks,
Mike

  reply	other threads:[~2015-03-02 22:49 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
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 [this message]
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=1462341.tRHO4kzITu@mlatimer1.dnsdhcp.provo.novell.com \
    --to=mlatimer@suse.com \
    --cc=ian.campbell@citrix.com \
    --cc=ian.jackson@eu.citrix.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.