From: Ian Campbell <ian.campbell@citrix.com>
To: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
Cc: xen-devel@lists.xensource.com, Wei Liu <wei.liu2@citrix.com>,
Mike Latimer <mlatimer@suse.com>,
Ian Jackson <Ian.Jackson@eu.citrix.com>,
xen-devel@lists.xen.org, Jim Fehlig <jfehlig@suse.com>
Subject: Re: [PATCH 0/4] fix freemem loop
Date: Fri, 6 Mar 2015 10:13:42 +0000 [thread overview]
Message-ID: <1425636822.14353.32.camel@citrix.com> (raw)
In-Reply-To: <alpine.DEB.2.02.1503060948330.15212@kaball.uk.xensource.com>
On Fri, 2015-03-06 at 09:52 +0000, Stefano Stabellini wrote:
> On Fri, 6 Mar 2015, Ian Campbell wrote:
> > On Thu, 2015-03-05 at 21:08 -0700, Mike Latimer wrote:
> > > On Thursday, March 05, 2015 05:49:35 PM Ian Campbell wrote:
> > > > On Tue, 2015-03-03 at 11:08 +0000, Stefano Stabellini wrote:
> > > > > Hi all,
> > > > >
> > > > > this patch series fixes the freemem loop on machines with very large
> > > > > amount of memory, where the current wait time is not enough.
> > > > >
> > > > > In order to be able to handle arbitrarly large amount of ram, we
> > > > > implement in libxl_wait_for_memory_target a policy of waiting until dom0
> > > > > is making progress.
> > > >
> > > > What is the impact of the libxl API change made here on other callers,
> > > > in particular libvirt?
> >
> > I should have CCd Jim when I asked the question. Now done.
> >
> > > This change will have one interesting effect on libvirt. Currently,
> > > libxlDomainFreeMem loops 3 times, then returns 0 (if no errors are
> > > encountered). This means that domain creation starts before dom0 finishes
> > > ballooning (unlike xl's previous behavior, which would fail).
> > >
> > > With this change, domain creation through virsh will wait (in
> > > libxl_wait_for_memory_target) until dom0 finishes ballooning. This should
> > > result in an increase in the speed of the domain starting, as there will not
> > > be memory contention between the two processes.
> > >
> > > The libvirt side calls libxl_wait_for_memory_target with a 1 second timeout -
> > > which doesn't leave a huge amount of room for slow memory allocation. This
> > > timeout, as well as the logic in general, should be changed to match the new
> > > xl behavior (IMO). I expect this to really only matter when dealing with large
> > > domains.
> >
> > For libvirt we also need to consider what happens when a libvirt which
> > is modified along these lines uses an older libxl (I believe back to 4.2
> > is supported).
>
> In the libvirt case even if libvirt calls libxl_wait_for_memory_target
> with just 1 second timeout, it is likely going to end up waiting longer
> than that due to the change in behaviour of the function.
>
> What I am saying is that even if we don't modify libvirt, we are going to
> get a more reliable and more stable behaviour than what we have now.
>
> That said, I agree that it would be good to improve the freemem loop in
> libvirt in a similar way to what we are doing with xl.
This is missing my point.
We need to consider the case of a modified libvirt with the old, broken,
libxl too.
You've only considered an unmodified libvirt running with a fixed libxl.
Ian.
next prev parent reply other threads:[~2015-03-06 10:13 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-03-03 11:08 [PATCH 0/4] fix freemem loop Stefano Stabellini
2015-03-03 11:08 ` [PATCH 1/4] Revert "libxl: Wait for ballooning if free memory is increasing" Stefano Stabellini
2015-03-03 11:08 ` [PATCH 2/4] libxl_wait_for_memory_target: wait as long as dom0 is making progress Stefano Stabellini
2015-03-06 18:10 ` Jim Fehlig
2015-03-03 11:08 ` [PATCH 3/4] freemem: remove call to libxl_wait_for_free_memory Stefano Stabellini
2015-03-03 11:08 ` [PATCH 4/4] libxl_wait_for_memory_target: wait for 2 sec at a time Stefano Stabellini
2015-03-03 21:54 ` [PATCH 0/4] fix freemem loop Mike Latimer
2015-03-04 23:55 ` Mike Latimer
2015-03-05 17:49 ` Ian Campbell
2015-03-06 4:08 ` Mike Latimer
2015-03-06 9:46 ` Ian Campbell
2015-03-06 9:52 ` Stefano Stabellini
2015-03-06 10:13 ` Ian Campbell [this message]
2015-03-06 10:22 ` Stefano Stabellini
2015-03-06 10:45 ` Ian Campbell
2015-03-06 17:58 ` Jim Fehlig
2015-03-06 9:48 ` Stefano Stabellini
2015-03-06 9:59 ` Ian Campbell
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=1425636822.14353.32.camel@citrix.com \
--to=ian.campbell@citrix.com \
--cc=Ian.Jackson@eu.citrix.com \
--cc=jfehlig@suse.com \
--cc=mlatimer@suse.com \
--cc=stefano.stabellini@eu.citrix.com \
--cc=wei.liu2@citrix.com \
--cc=xen-devel@lists.xen.org \
--cc=xen-devel@lists.xensource.com \
/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.