This is a backport of chagesets 23420-23423 from xen-unstable to support allocation of superpages for hvm domains on restore. Original patches by George Dunlap 6 files changed, 201 insertions(+), 80 deletions(-) tools/libxc/xc_domain_restore.c | 157 ++++++++++++++++++++++++------- tools/libxc/xc_domain_save.c | 117 ++++++++++++++--------- tools/libxl/libxl_dom.c | 2 tools/python/xen/xend/XendCheckpoint.py | 2 tools/xcutils/xc_restore.c | 2 xen/include/public/domctl.h | 1
Juergen Gross
2012-Jul-13 09:28 UTC
[PATCH 1 of 4] xen 4.0: tools: libxc: Detect superpages on domain restore
When receiving pages, look for contiguous 2-meg aligned regions and attempt to allocate a superpage for that region, falling back to 4k pages if the allocation fails. (Minor conflict fixed up. -iwj) Signed-off-by: George Dunlap <george.dunlap@eu.citrix.com> Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com> Signed-off-by: Juergen Gross <juergen.gross@ts.fujitsu.com> 1 file changed, 106 insertions(+), 16 deletions(-) tools/libxc/xc_domain_restore.c | 122 +++++++++++++++++++++++++++++++++------ _______________________________________________ Xen-devel mailing list Xen-devel@lists.xen.org http://lists.xen.org/xen-devel
Juergen Gross
2012-Jul-13 09:28 UTC
[PATCH 2 of 4] xen 4.0: tools: Save superpages in the same batch, to make detection easier
On the first time through (when pfns are mostly allocated on the receiving side), try to keep superpages together in the same batch by ending a batch early if we see the first page of a potential superpage and there isn''t enough room in the batch for a full superpage. Signed-off-by: George Dunlap <george.dunlap@eu.citrix.com> 1 file changed, 12 insertions(+) tools/libxc/xc_domain_save.c | 12 ++++++++++++ _______________________________________________ Xen-devel mailing list Xen-devel@lists.xen.org http://lists.xen.org/xen-devel
Juergen Gross
2012-Jul-13 09:28 UTC
[PATCH 3 of 4] xen 4.0: tools: Introduce "allocate-only" page type for migration
To detect presence of superpages on the receiver side, we need to have strings of sequential pfns sent across on the first iteration through the memory. However, as we go through the memory, more and more of it will be marked dirty, making it wasteful to send those pages. This patch introduces a new PFINFO type, "XALLOC". Like PFINFO_XTAB, it indicates that there is no corresponding page present in the subsquent page buffer. However, unlike PFINFO_XTAB, it contains a pfn which should be allocated. This new type is only used for migration; but it''s placed in xen/public/domctl.h so that the value isn''t reused. Signed-off-by: George Dunlap <george.dunlap@eu.citrix.com> 3 files changed, 79 insertions(+), 62 deletions(-) tools/libxc/xc_domain_restore.c | 35 +++++++------ tools/libxc/xc_domain_save.c | 105 +++++++++++++++++++++------------------ xen/include/public/domctl.h | 1 _______________________________________________ Xen-devel mailing list Xen-devel@lists.xen.org http://lists.xen.org/xen-devel
Juergen Gross
2012-Jul-13 09:28 UTC
[PATCH 4 of 4] xen 4.0: tools: Enable superpages for HVM domains by default
Signed-off-by: George Dunlap <george.dunlap@eu.citrix.com> Signed-off-by: Juergen Gross <juergen.gross@ts.fujitsu.com> 3 files changed, 4 insertions(+), 2 deletions(-) tools/libxl/libxl_dom.c | 2 +- tools/python/xen/xend/XendCheckpoint.py | 2 ++ tools/xcutils/xc_restore.c | 2 +- _______________________________________________ Xen-devel mailing list Xen-devel@lists.xen.org http://lists.xen.org/xen-devel