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] Improve balloon support for NetBSD.

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-unstable] Improve balloon support for NetBSD.
From: Xen patchbot-unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Tue, 20 Jul 2010 01:45:19 -0700
Delivery-date: Tue, 20 Jul 2010 01:46:40 -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 <sstabellini@xxxxxxxxxxxxx>
# Date 1279538524 -3600
# Node ID 092da4a970aca76920232fa52cb3bd9b7c160956
# Parent  9ccd024065c591071a22616fb00b854e2836ed33
Improve balloon support for NetBSD.

Signed-off-by: Christoph Egger <Christoph.Egger@xxxxxxx>
---
 tools/python/xen/xend/osdep.py |   16 +++++++++++-----
 1 files changed, 11 insertions(+), 5 deletions(-)

diff -r 9ccd024065c5 -r 092da4a970ac tools/python/xen/xend/osdep.py
--- a/tools/python/xen/xend/osdep.py    Mon Jul 19 12:21:24 2010 +0100
+++ b/tools/python/xen/xend/osdep.py    Mon Jul 19 12:22:04 2010 +0100
@@ -83,13 +83,19 @@ def _netbsd_balloon_stat(label):
 
     import commands
 
-    if label != 'current':
-       return None
-    cmd = "/sbin/sysctl hw.physmem64"
+    xend2netbsd_labels = { 'current'      : 'kern.xen.balloon.current',
+                           'target'       : 'kern.xen.balloon.target',
+                           'low-balloon'  : None,
+                           'high-balloon' : None,
+                           'limit'        : None }
+
+    cmdarg = xend2netbsd_labels[label]
+    if cmdarg is None:
+        return None
+    cmd = "/sbin/sysctl " + cmdarg
     sysctloutput = commands.getoutput(cmd)
     (name, value) = sysctloutput.split('=')
-    """Return value in KB."""
-    return int(value) / 1024
+    return int(value)
 
 def _solaris_balloon_stat(label):
     """Returns the value for the named label, or None if an error occurs."""

_______________________________________________
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] Improve balloon support for NetBSD., Xen patchbot-unstable <=