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] Move credit scheduler configuration into

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-unstable] Move credit scheduler configuration into XendDomainInfo, so that the domain
From: Xen patchbot-unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Mon, 26 Feb 2007 15:45:41 -0800
Delivery-date: Mon, 26 Feb 2007 15:46:52 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
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/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/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 Ewan Mellor <ewan@xxxxxxxxxxxxx>
# Date 1172504374 0
# Node ID 0b5da89e2b3dfb2c5c2e975cefbf24e6604edc19
# Parent  ca1dd348054021b42d47af5a7f5ad808272d3233
Move credit scheduler configuration into XendDomainInfo, so that the domain
will be cleaned up correctly if the scheduler parameters are wrong.

Signed-off-by: Masaki Kanno <kanno.masaki@xxxxxxxxxxxxxx>
---
 tools/python/xen/xend/XendDomain.py     |   14 +-------------
 tools/python/xen/xend/XendDomainInfo.py |    9 ++++++++-
 2 files changed, 9 insertions(+), 14 deletions(-)

diff -r ca1dd3480540 -r 0b5da89e2b3d tools/python/xen/xend/XendDomain.py
--- a/tools/python/xen/xend/XendDomain.py       Mon Feb 26 14:48:46 2007 +0000
+++ b/tools/python/xen/xend/XendDomain.py       Mon Feb 26 15:39:34 2007 +0000
@@ -32,7 +32,7 @@ import xen.lowlevel.xc
 import xen.lowlevel.xc
 
 
-from xen.xend import XendOptions, XendCheckpoint, XendDomainInfo, XendNode
+from xen.xend import XendOptions, XendCheckpoint, XendDomainInfo
 from xen.xend.PrettyPrint import prettyprint
 from xen.xend.XendConfig import XendConfig
 from xen.xend.XendError import XendError, XendInvalidDomain, VmError
@@ -875,10 +875,6 @@ class XendDomain:
             self._refresh()
 
             dominfo = XendDomainInfo.create(config)
-            if XendNode.instance().xenschedinfo() == 'credit':
-                self.domain_sched_credit_set(dominfo.getDomid(),
-                                             dominfo.getWeight(),
-                                             dominfo.getCap())
             return dominfo
         finally:
             self.domains_lock.release()
@@ -895,10 +891,6 @@ class XendDomain:
             self._refresh()
 
             dominfo = XendDomainInfo.create_from_dict(config_dict)
-            if XendNode.instance().xenschedinfo() == 'credit':
-                self.domain_sched_credit_set(dominfo.getDomid(),
-                                             dominfo.getWeight(),
-                                             dominfo.getCap())
             return dominfo
         finally:
             self.domains_lock.release()
@@ -952,10 +944,6 @@ class XendDomain:
                                  POWER_STATE_NAMES[dominfo.state])
             
             dominfo.start(is_managed = True)
-            if XendNode.instance().xenschedinfo() == 'credit':
-                self.domain_sched_credit_set(dominfo.getDomid(),
-                                             dominfo.getWeight(),
-                                             dominfo.getCap())
         finally:
             self.domains_lock.release()
         dominfo.waitForDevices()
diff -r ca1dd3480540 -r 0b5da89e2b3d tools/python/xen/xend/XendDomainInfo.py
--- a/tools/python/xen/xend/XendDomainInfo.py   Mon Feb 26 14:48:46 2007 +0000
+++ b/tools/python/xen/xend/XendDomainInfo.py   Mon Feb 26 15:39:34 2007 +0000
@@ -398,11 +398,18 @@ class XendDomainInfo:
                 XendTask.log_progress(81, 90, self._registerWatches)
                 XendTask.log_progress(91, 100, self.refreshShutdown)
 
+                xendomains = XendDomain.instance()
+                xennode = XendNode.instance()
+
                 # save running configuration if XendDomains believe domain is
                 # persistent
                 if is_managed:
-                    xendomains = XendDomain.instance()
                     xendomains.managed_config_save(self)
+
+                if xennode.xenschedinfo() == 'credit':
+                    xendomains.domain_sched_credit_set(self.getDomid(),
+                                                       self.getWeight(),
+                                                       self.getCap())
             except:
                 log.exception('VM start failed')
                 self.destroy()

_______________________________________________
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] Move credit scheduler configuration into XendDomainInfo, so that the domain, Xen patchbot-unstable <=