WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

[Xen-devel] [PATCH 3/7] libxenlight meta-resend: physmap slack for pv do

To: Stefano Stabellini <Stefano.Stabellini@xxxxxxxxxxxxx>, Vincent Hanquez <vincent.hanquez@xxxxxxxxxxxxx>, xen-devel@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-devel] [PATCH 3/7] libxenlight meta-resend: physmap slack for pv domains
From: Andres Lagar-Cavilla <andres@xxxxxxxxxxxxxxxx>
Date: Thu, 03 Dec 2009 12:05:19 -0500
Cc:
Delivery-date: Thu, 03 Dec 2009 09:05:41 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <4B16AB3F.4000809@xxxxxxxxxxxxxxxx>
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
References: <4B16AB3F.4000809@xxxxxxxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Thunderbird 2.0.0.23 (X11/20090817)
Contemplate a memory space slack for PV domains,
since they do ballooning (or flipping network rx)
and need some extra room in their pfn space.

Note that this does not allocate any extra memory
to the domain, it simply extends the physmap with
some extra room for "bounce bufffering back" pfn's
that are yielded to dom0.

The default slack is set at 8MB.

Signed-off-by: Andres Lagar-Cavilla <andres@xxxxxxxxxxxxxxxx>

# HG changeset patch
# User Andres Lagar-Cavilla <andres@xxxxxxxxxxxxxxxx>
# Date 1259856754 18000
# Node ID 7315ca037a680d18a6c23d030139b5389a73000b
# Parent  e64cd1042530990b49647d6eeb1c4167f02d4f19
Contemplate a memory space slack for PV domains,
since they do ballooning (or flipping network rx)
and need some extra room in their pfn space.

Note that this does not allocate any extra memory
to the domain, it simply extends the physmap with
some extra room for "bounce bufffering back" pfn's
that are yielded to dom0.

The default slack is set at 8MB.

Signed-off-by: Andres Lagar-Cavilla <andres@xxxxxxxxxxxxxxxx>

diff -r e64cd1042530 -r 7315ca037a68 libxl.c
--- a/libxl.c
+++ b/libxl.c
@@ -2034,6 +2034,8 @@ void init_build_info(libxl_domain_build_
         b_info->u.hvm.acpi = 1;
         b_info->u.hvm.nx = 1;
         b_info->u.hvm.viridian = 0;
+    } else {
+        b_info->u.pv.slack_memkb = 8 * 1024;
     }
 }
 
diff -r e64cd1042530 -r 7315ca037a68 libxl.h
--- a/libxl.h
+++ b/libxl.h
@@ -80,6 +80,7 @@ typedef struct {
             char *timeoffset;
         } hvm;
         struct {
+            uint32_t   slack_memkb;
             const char *cmdline;
             const char *ramdisk;
             const char *features;
diff -r e64cd1042530 -r 7315ca037a68 libxl_dom.c
--- a/libxl_dom.c
+++ b/libxl_dom.c
@@ -53,7 +53,9 @@ int build_pre(struct libxl_ctx *ctx, uin
         xc_set_hvm_param(ctx->xch, domid, HVM_PARAM_VPT_ALIGN, (unsigned long) 
info->vpt_align);
     xc_domain_max_vcpus(ctx->xch, domid, info->max_vcpus);
     xc_domain_setmaxmem(ctx->xch, domid, info->max_memkb + info->video_memkb);
-    xc_domain_set_memmap_limit(ctx->xch, domid, info->max_memkb);
+    xc_domain_set_memmap_limit(ctx->xch, domid, 
+            (info->hvm) ? info->max_memkb : 
+            (info->max_memkb + info->u.pv.slack_memkb));
 
     if (info->hvm) {
         unsigned long shadow;
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel