[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-changelog] [xen-unstable] Fix 'xm create' and 'xm start' when SEDF scheduler is used.



# HG changeset patch
# User kfraser@xxxxxxxxxxxxxxxxxxxxx
# Date 1170068120 0
# Node ID 5d9b72e640e050cbe5a1e3677c4ca7cb2cd868c1
# Parent  b2c1eeee2dcf52d0bdb983175b18c22f89f27d68
Fix 'xm create' and 'xm start' when SEDF scheduler is used.

If the Xen is running with the sedf scheduler, the following functions
do not call the domain_sched_credit_set().
 - domain_create()
 - domain_create_from_dict()
 - domain_start()

Signed-off-by: Masaki Kanno <kanno.masaki@xxxxxxxxxxxxxx>
---
 tools/python/xen/xend/XendDomain.py |   23 +++++++++++++----------
 1 files changed, 13 insertions(+), 10 deletions(-)

diff -r b2c1eeee2dcf -r 5d9b72e640e0 tools/python/xen/xend/XendDomain.py
--- a/tools/python/xen/xend/XendDomain.py       Mon Jan 29 10:52:17 2007 +0000
+++ b/tools/python/xen/xend/XendDomain.py       Mon Jan 29 10:55:20 2007 +0000
@@ -32,7 +32,7 @@ import xen.lowlevel.xc
 import xen.lowlevel.xc
 
 
-from xen.xend import XendOptions, XendCheckpoint, XendDomainInfo
+from xen.xend import XendOptions, XendCheckpoint, XendDomainInfo, XendNode
 from xen.xend.PrettyPrint import prettyprint
 from xen.xend.XendConfig import XendConfig
 from xen.xend.XendError import XendError, XendInvalidDomain, VmError
@@ -868,9 +868,10 @@ class XendDomain:
             self._refresh()
 
             dominfo = XendDomainInfo.create(config)
-            self.domain_sched_credit_set(dominfo.getDomid(),
-                                         dominfo.getWeight(),
-                                         dominfo.getCap())
+            if XendNode.instance().xenschedinfo() == 'credit':
+                self.domain_sched_credit_set(dominfo.getDomid(),
+                                             dominfo.getWeight(),
+                                             dominfo.getCap())
             return dominfo
         finally:
             self.domains_lock.release()
@@ -887,9 +888,10 @@ class XendDomain:
             self._refresh()
 
             dominfo = XendDomainInfo.create_from_dict(config_dict)
-            self.domain_sched_credit_set(dominfo.getDomid(),
-                                         dominfo.getWeight(),
-                                         dominfo.getCap())
+            if XendNode.instance().xenschedinfo() == 'credit':
+                self.domain_sched_credit_set(dominfo.getDomid(),
+                                             dominfo.getWeight(),
+                                             dominfo.getCap())
             return dominfo
         finally:
             self.domains_lock.release()
@@ -943,9 +945,10 @@ class XendDomain:
                                  POWER_STATE_NAMES[dominfo.state])
             
             dominfo.start(is_managed = True)
-            self.domain_sched_credit_set(dominfo.getDomid(),
-                                         dominfo.getWeight(),
-                                         dominfo.getCap())
+            if XendNode.instance().xenschedinfo() == 'credit':
+                self.domain_sched_credit_set(dominfo.getDomid(),
+                                             dominfo.getWeight(),
+                                             dominfo.getCap())
         finally:
             self.domains_lock.release()
         dominfo.waitForDevices()

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.