mirror of
https://github.com/xen-project/xen.git
synced 2026-10-29 18:50:05 +01:00
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@jp.fujitsu.com>
This commit is contained in:
1 parent
45ce6547e6
commit
d0ee673709
1 file changed
+13
-10
@@ -32,7 +32,7 @@ import threading
|
||||
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()
|
||||
|
||||