From: Juergen Gross <juergen.gross@ts.fujitsu.com>
To: Dario Faggioli <dario.faggioli@citrix.com>
Cc: Dan Magenheimer <dan.magenheimer@oracle.com>,
Ian Campbell <Ian.Campbell@citrix.com>,
George Dunlap <George.Dunlap@eu.citrix.com>,
Andrew Cooper <Andrew.Cooper3@citrix.com>,
"Tim (Xen.org)" <tim@xen.org>, Olaf Hering <olaf@aepfle.de>,
xen-devel <xen-devel@lists.xen.org>,
David Vrabel <dvrabel@cantab.net>,
Keir Fraser <keir.xen@gmail.com>,
Andres Lagar-Cavilla <andres@lagarcavilla.org>,
Jan Beulich <JBeulich@suse.com>,
Roger Pau Monne <roger.pau@citrix.com>
Subject: Re: [PATCH 6 of 8 [RFC]] libxc: introduce xc_domain_move_memory
Date: Tue, 09 Apr 2013 10:13:22 +0200 [thread overview]
Message-ID: <5163CDA2.7030206@ts.fujitsu.com> (raw)
In-Reply-To: <1365490591.17022.14.camel@Abyss>
On 09.04.2013 08:56, Dario Faggioli wrote:
> On mar, 2013-04-09 at 06:23 +0100, Juergen Gross wrote:
>> On 09.04.2013 04:49, Dario Faggioli wrote:
>>> as a mechanism of deallocating and reallocating (immediately!) _all_
>>> the memory of a domain. Notice it relies on the guest being suspended
>>> already, before the function is invoked.
>>
>> Is this solution intended to be the final one?
>>
> Well, the idea of sharing the patches, even at this stage, was right
> about discussing that! :-P
>
>> This might be okay for a domain with less than 1GB of memory, but I see
>> problems for really huge domains. The needed time to copy the memory might
>> result in long offline times.
>>
> I see what you mean. I thought about approaches that copy only a
> specific part of the memory, perhaps according to some usage statistics.
>
> I've not yet abandoned that idea, but I honestly think that, if we go
> through the suspend-copy-resume (which is pretty much the only thing I
> can do with PV guests, isn't it?), that can't be for a page or two, or
> the impact of the overhead would be even higher!
>
>> For this case something like live migration
>> (optional?) would be a better solution, I think.
>>
> Well, I thought about that too, and I'm open to
> thinking/discussing/hearing suggestions about how to implement a "live
> phase" for this.
>
> The problem is, with a more migration-alike approach, I'll end up
> doubling the memory requirements of, potentially, all the domains (since
> I'd need space for storing the full RAM image of each one!), which I
> don't think it is an acceptable requirement either, _especially_ for big
> guests, is it? :-(
What about the following approach:
- do the migration in chunks (like 1GB, may be configurable)
- don't move pages which are already on one of the target nodes
- try to allocate memory on the target node while the domain is still running.
If this fails, there is no need to move that chunk. Depending on the page
size requirements (huge pages) decide whether the move is aborted or done
partially.
- in case of successful allocation suspend the domain, do the copy and update
page tables for the copied pages, then resume the domain
- free the memory chunk on the old node(s)
- repeat until either no memory obtained or move is finished
This will have higher overhead, but the domain will be suspended for only
short periods of time. The memory requirements don't matter, as the additional
memory will be allocated only for a short period of time. Additionally this
approach is more secure, as the domain can't end in suspended state without
memory (you don't have to avoid ballooning or creation of other domains during
the move).
Juergen
--
Juergen Gross Principal Developer Operating Systems
PBG PDG ES&S SWE OS6 Telephone: +49 (0) 89 3222 2967
Fujitsu Technology Solutions e-mail: juergen.gross@ts.fujitsu.com
Domagkstr. 28 Internet: ts.fujitsu.com
D-80807 Muenchen Company details: ts.fujitsu.com/imprint.html
next prev parent reply other threads:[~2013-04-09 8:13 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-04-09 2:49 [PATCH 0 of 8 [RFC]] Move all the memory of a domain Dario Faggioli
2013-04-09 2:49 ` [PATCH 1 of 8 [RFC]] xl: allow for node-wise specification of vcpu pinning Dario Faggioli
2013-04-09 2:49 ` [PATCH 2 of 8 [RFC]] xl: allow for changing NUMA node affinity on-line Dario Faggioli
2013-04-09 2:49 ` [PATCH 3 of 8 [RFC]] libxc: introduce xc_domain_get_address_size Dario Faggioli
2013-04-09 2:49 ` [PATCH 4 of 8 [RFC]] libxc: introduce xc_map_domain_meminfo (and xc_unmap_domain_meminfo) Dario Faggioli
2013-04-09 2:49 ` [PATCH 5 of 8 [RFC]] libxc: allow for ctxt to be NULL in xc_vcpu_setcontext Dario Faggioli
2013-04-09 2:49 ` [PATCH 6 of 8 [RFC]] libxc: introduce xc_domain_move_memory Dario Faggioli
2013-04-09 5:23 ` Juergen Gross
2013-04-09 6:56 ` Dario Faggioli
2013-04-09 8:13 ` Juergen Gross [this message]
2013-04-09 8:51 ` Dario Faggioli
2013-04-09 9:16 ` Juergen Gross
2013-04-09 17:43 ` Dan Magenheimer
2013-04-11 14:16 ` Dario Faggioli
2013-05-02 14:32 ` Tim Deegan
2013-05-02 15:07 ` George Dunlap
2013-05-02 15:13 ` Tim Deegan
2013-05-06 17:37 ` Dario Faggioli
2013-05-06 17:29 ` Dario Faggioli
2013-04-09 2:49 ` [PATCH 7 of 8 [RFC]] libxl: introduce libxl_domain_move_memory Dario Faggioli
2013-04-09 2:49 ` [PATCH 8 of 8 [RFC]] tools/misc: introduce xen-mfndump Dario Faggioli
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=5163CDA2.7030206@ts.fujitsu.com \
--to=juergen.gross@ts.fujitsu.com \
--cc=Andrew.Cooper3@citrix.com \
--cc=George.Dunlap@eu.citrix.com \
--cc=Ian.Campbell@citrix.com \
--cc=JBeulich@suse.com \
--cc=andres@lagarcavilla.org \
--cc=dan.magenheimer@oracle.com \
--cc=dario.faggioli@citrix.com \
--cc=dvrabel@cantab.net \
--cc=keir.xen@gmail.com \
--cc=olaf@aepfle.de \
--cc=roger.pau@citrix.com \
--cc=tim@xen.org \
--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.