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] Revert 20006:edf21ab7d7a4 and 20023:2b283

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-unstable] Revert 20006:edf21ab7d7a4 and 20023:2b28320c6f8c.
From: Xen patchbot-unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Thu, 06 Aug 2009 05:35:23 -0700
Delivery-date: Thu, 06 Aug 2009 05:36:54 -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 1249480589 -3600
# Node ID 4523048f6fabddb77e62949745b599cc123be938
# Parent  88e69c887df8114777cfe340f7ba1532cecd9d15
Revert 20006:edf21ab7d7a4 and 20023:2b28320c6f8c.
---
 tools/python/xen/xend/XendConfig.py     |    9 ++++-----
 tools/python/xen/xend/XendDomainInfo.py |   12 ++++++++++--
 2 files changed, 14 insertions(+), 7 deletions(-)

diff -r 88e69c887df8 -r 4523048f6fab tools/python/xen/xend/XendConfig.py
--- a/tools/python/xen/xend/XendConfig.py       Wed Aug 05 14:39:46 2009 +0100
+++ b/tools/python/xen/xend/XendConfig.py       Wed Aug 05 14:56:29 2009 +0100
@@ -1055,7 +1055,10 @@ class XendConfig(dict):
         if domain.getDomid() is not None:
             sxpr.append(['domid', domain.getDomid()])
 
-        if not legacy_only:
+        if legacy_only:
+            sxpr.append(['cpu_weight', int(self['vcpus_params'].get('weight', 
256))])
+            sxpr.append(['cpu_cap', int(self['vcpus_params'].get('cap', 0))])
+        else:
             for name, typ in XENAPI_CFG_TYPES.items():
                 if name in self and self[name] not in (None, []):
                     if typ == dict:
@@ -1084,10 +1087,6 @@ class XendConfig(dict):
                 continue
             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 88e69c887df8 -r 4523048f6fab tools/python/xen/xend/XendDomainInfo.py
--- a/tools/python/xen/xend/XendDomainInfo.py   Wed Aug 05 14:39:46 2009 +0100
+++ b/tools/python/xen/xend/XendDomainInfo.py   Wed Aug 05 14:56:29 2009 +0100
@@ -484,6 +484,7 @@ class XendDomainInfo:
                     # we just ignore it so that the domain can still be 
restored
                     log.warn("Cannot restore CPU affinity")
 
+                self._setSchedParams()
                 self._storeVmDetails()
                 self._createChannels()
                 self._createDevices()
@@ -2449,8 +2450,6 @@ 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")
@@ -2571,6 +2570,12 @@ class XendDomainInfo:
                 for v in range(0, self.info['VCPUs_max']):
                     xc.vcpu_setaffinity(self.domid, v, cpumask)
 
+    def _setSchedParams(self):
+        if XendNode.instance().xenschedinfo() == 'credit':
+            from xen.xend import XendDomain
+            XendDomain.instance().domain_sched_credit_set(self.getDomid(),
+                                                          self.getWeight(),
+                                                          self.getCap())
 
     def _initDomain(self):
         log.debug('XendDomainInfo.initDomain: %s %s',
@@ -2586,6 +2591,9 @@ class XendDomainInfo:
             # this is done prior to memory allocation to aide in memory
             # distribution for NUMA systems.
             self._setCPUAffinity()
+
+            # Set scheduling parameters.
+            self._setSchedParams()
 
             # Use architecture- and image-specific calculations to determine
             # the various headrooms necessary, given the raw configured

_______________________________________________
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] Revert 20006:edf21ab7d7a4 and 20023:2b28320c6f8c., Xen patchbot-unstable <=