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-changelog

[Xen-changelog] [xen-unstable] libxl: proper accounting for the videoram

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-unstable] libxl: proper accounting for the videoram
From: Xen patchbot-unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Sat, 09 Oct 2010 14:56:04 -0700
Delivery-date: Sat, 09 Oct 2010 15:04:06 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-changelog-request@lists.xensource.com?subject=help>
List-id: BK change log <xen-changelog.lists.xensource.com>
List-post: <mailto:xen-changelog@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=unsubscribe>
Reply-to: xen-devel@xxxxxxxxxxxxxxxxxxx
Sender: xen-changelog-bounces@xxxxxxxxxxxxxxxxxxx
# HG changeset patch
# User Stefano Stabellini <stefano.stabellini@xxxxxxxxxxxxx>
# Date 1285175021 -3600
# Node ID e01600ac72958f3e90ebcb74f085e940dfd0442e
# Parent  d4a30bee570198e7dfce0f43b20de52fb4f0574b
libxl: proper accounting for the videoram

Remove the videoram from the memory target of the domains consistently,
leave the total amount of memory in maxmem.

[fixed up for conflicts with libxl__ naming policy changes -iwj]

Signed-off-by: Stefano Stabellini <stefano.stabellini@xxxxxxxxxxxxx>
Signed-off-by: Ian Jackson <ian.jackson@xxxxxxxxxxxxx>
---
 tools/libxl/libxl.c     |    5 +++--
 tools/libxl/libxl_dom.c |    2 +-
 2 files changed, 4 insertions(+), 3 deletions(-)

diff -r d4a30bee5701 -r e01600ac7295 tools/libxl/libxl.c
--- a/tools/libxl/libxl.c       Wed Sep 22 18:02:36 2010 +0100
+++ b/tools/libxl/libxl.c       Wed Sep 22 18:03:41 2010 +0100
@@ -2952,12 +2952,13 @@ retry_transaction:
         }
     }
 
+    new_target_memkb -= videoram;
     rc = xc_domain_memory_set_pod_target(ctx->xch, domid,
-            (new_target_memkb - videoram) / 4, NULL, NULL, NULL);
+            new_target_memkb / 4, NULL, NULL, NULL);
     if (rc != 0) {
         LIBXL__LOG_ERRNO(ctx, LIBXL__LOG_ERROR,
                 "xc_domain_memory_set_pod_target domid=%d, memkb=%d "
-                "failed rc=%d\n", domid, (new_target_memkb - videoram) / 4,
+                "failed rc=%d\n", domid, new_target_memkb / 4,
                 rc);
         abort = 1;
         goto out;
diff -r d4a30bee5701 -r e01600ac7295 tools/libxl/libxl_dom.c
--- a/tools/libxl/libxl_dom.c   Wed Sep 22 18:02:36 2010 +0100
+++ b/tools/libxl/libxl_dom.c   Wed Sep 22 18:03:41 2010 +0100
@@ -110,7 +110,7 @@ int libxl__build_post(libxl_ctx *ctx, ui
     ents[0] = "memory/static-max";
     ents[1] = libxl__sprintf(&gc, "%d", info->max_memkb);
     ents[2] = "memory/target";
-    ents[3] = libxl__sprintf(&gc, "%d", info->target_memkb);
+    ents[3] = libxl__sprintf(&gc, "%d", info->target_memkb - 
info->video_memkb);
     ents[4] = "memory/videoram";
     ents[5] = libxl__sprintf(&gc, "%d", info->video_memkb);
     ents[6] = "domid";

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] [xen-unstable] libxl: proper accounting for the videoram, Xen patchbot-unstable <=