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] xend: save/restore cpu_weight and cpu_cap

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-unstable] xend: save/restore cpu_weight and cpu_cap
From: Xen patchbot-unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Tue, 04 Aug 2009 08:50:21 -0700
Delivery-date: Tue, 04 Aug 2009 08:50:59 -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 Keir Fraser <keir.fraser@xxxxxxxxxx>
# Date 1249212383 -3600
# Node ID edf21ab7d7a4c16214276ca32f9e5b64fce3418a
# Parent  3bf7ab30e53777db620e76c6734d7c65f6e0e55e
xend: save/restore cpu_weight and cpu_cap

This patch allows vcpus_params cpu_weight and cpu_cap to be saved and
restored.  Most the code to support this already existed, but the save
path needed to be updated to explicitly save these params, and the
restore path needed to be updated to resend the params down to the
kernel.

From: Andrew Jones <drjones@xxxxxxxxxx>
Signed-off-by: Keir Fraser <keir.fraser@xxxxxxxxxx>
---
 tools/python/xen/xend/XendConfig.py     |    4 ++++
 tools/python/xen/xend/XendDomainInfo.py |    2 ++
 2 files changed, 6 insertions(+)

diff -r 3bf7ab30e537 -r edf21ab7d7a4 tools/python/xen/xend/XendConfig.py
--- a/tools/python/xen/xend/XendConfig.py       Sun Aug 02 12:25:01 2009 +0100
+++ b/tools/python/xen/xend/XendConfig.py       Sun Aug 02 12:26:23 2009 +0100
@@ -1088,6 +1088,10 @@ class XendConfig(dict):
             if self.has_key(legacy) and self[legacy] not in (None, []):
                 sxpr.append([legacy, self[legacy]])
 
+        if self.has_key('vcpus_params'):
+            sxpr.append(['cpu_weight', int(self['vcpus_params'].get('weight', 
256))])
+            sxpr.append(['cpu_cap', int(self['vcpus_params'].get('cap', 0))])
+
         if self.has_key('security_label'):
             sxpr.append(['security_label', self['security_label']])
 
diff -r 3bf7ab30e537 -r edf21ab7d7a4 tools/python/xen/xend/XendDomainInfo.py
--- a/tools/python/xen/xend/XendDomainInfo.py   Sun Aug 02 12:25:01 2009 +0100
+++ b/tools/python/xen/xend/XendDomainInfo.py   Sun Aug 02 12:26:23 2009 +0100
@@ -2448,6 +2448,8 @@ class XendDomainInfo:
                 raise VmError("Cpu cap out of range, valid range is from 0 to 
%s for specified number of vcpus" %
                               (self.getVCpuCount() * 100))
 
+            xc.sched_credit_domain_set(self.domid, weight, cap)
+
         # Test whether the devices can be assigned with VT-d
         self.info.update_platform_pci()
         pci = self.info["platform"].get("pci")

_______________________________________________
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] xend: save/restore cpu_weight and cpu_cap, Xen patchbot-unstable <=