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: Remove _setSchedParams

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-unstable] xend: Remove _setSchedParams
From: Xen patchbot-unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Thu, 06 Aug 2009 05:35:21 -0700
Delivery-date: Thu, 06 Aug 2009 05:36:41 -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 1249477418 -3600
# Node ID 2b28320c6f8cb4d9e5d3ce2384e15d7a7e466871
# Parent  194c2be92084631e660e8bcd34cc7cda5d7de87b
xend: Remove _setSchedParams

Currently, xc.sched_credit_domain_set is called twice when domains
are created.

start@XendDomainInfo
  _constructDomain
    xc.sched_credit_domain_set  --- 1st
  _initDomain
    _setSchedParams
      domain_sched_credit_set
        xc.sched_credit_domain_set  --- 2nd

resume@XendDomainInfo
  _constructDomain
    xc.sched_credit_domain_set  --- 1st
  _setSchedParams
    domain_sched_credit_set
      xc.sched_credit_domain_set  --- 2nd

This patch removes _setSchedParams method added by changeset 19955,
because xc.sched_credit_domain_set was added into _constructDomain
method by changeset 20006.

Signed-off-by: Masaki Kanno <kanno.masaki@xxxxxxxxxxxxxx>
---
 tools/python/xen/xend/XendConfig.py     |    5 +----
 tools/python/xen/xend/XendDomainInfo.py |   10 ----------
 2 files changed, 1 insertion(+), 14 deletions(-)

diff -r 194c2be92084 -r 2b28320c6f8c tools/python/xen/xend/XendConfig.py
--- a/tools/python/xen/xend/XendConfig.py       Wed Aug 05 14:02:46 2009 +0100
+++ b/tools/python/xen/xend/XendConfig.py       Wed Aug 05 14:03:38 2009 +0100
@@ -1055,10 +1055,7 @@ class XendConfig(dict):
         if domain.getDomid() is not None:
             sxpr.append(['domid', domain.getDomid()])
 
-        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:
+        if not legacy_only:
             for name, typ in XENAPI_CFG_TYPES.items():
                 if name in self and self[name] not in (None, []):
                     if typ == dict:
diff -r 194c2be92084 -r 2b28320c6f8c tools/python/xen/xend/XendDomainInfo.py
--- a/tools/python/xen/xend/XendDomainInfo.py   Wed Aug 05 14:02:46 2009 +0100
+++ b/tools/python/xen/xend/XendDomainInfo.py   Wed Aug 05 14:03:38 2009 +0100
@@ -484,7 +484,6 @@ 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()
@@ -2572,12 +2571,6 @@ 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',
@@ -2593,9 +2586,6 @@ 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] xend: Remove _setSchedParams, Xen patchbot-unstable <=