All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH][RESEND] Fix xm create command for wrong scheduler parameters
@ 2007-02-26 10:07 Masaki Kanno
  2007-02-26 15:40 ` Ewan Mellor
  0 siblings, 1 reply; 2+ messages in thread
From: Masaki Kanno @ 2007-02-26 10:07 UTC (permalink / raw)
  To: xen-devel; +Cc: ewan

[-- Attachment #1: Mail message body --]
[-- Type: text/plain, Size: 395 bytes --]

Hi,

I resend the patch to solve the issue that I reported as follows. 

http://lists.xensource.com/archives/html/xen-devel/2007-02/msg00180.html


The behavior of the xm create command isn't the specification, 
is it?  If it is specification, I withdraw the patch. 
Could you possibly comment or apply the patch? 

Signed-off-by: Masaki Kanno <kanno.masaki@jp.fujitsu.com>

Best regards,
 Kan


[-- Attachment #2: xm_create_with_credit_take2.patch --]
[-- Type: application/octet-stream, Size: 3188 bytes --]

diff -r 2c3a13993b0d tools/python/xen/xend/XendDomain.py
--- a/tools/python/xen/xend/XendDomain.py	Fri Feb 23 14:44:07 2007 +0000
+++ b/tools/python/xen/xend/XendDomain.py	Mon Feb 26 18:33:11 2007 +0900
@@ -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
@@ -874,10 +874,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()
@@ -894,10 +890,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()
@@ -951,10 +943,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 2c3a13993b0d tools/python/xen/xend/XendDomainInfo.py
--- a/tools/python/xen/xend/XendDomainInfo.py	Fri Feb 23 14:44:07 2007 +0000
+++ b/tools/python/xen/xend/XendDomainInfo.py	Mon Feb 26 18:33:16 2007 +0900
@@ -396,11 +396,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()

[-- Attachment #3: Type: text/plain, Size: 138 bytes --]

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

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH][RESEND] Fix xm create command for wrong scheduler parameters
  2007-02-26 10:07 [PATCH][RESEND] Fix xm create command for wrong scheduler parameters Masaki Kanno
@ 2007-02-26 15:40 ` Ewan Mellor
  0 siblings, 0 replies; 2+ messages in thread
From: Ewan Mellor @ 2007-02-26 15:40 UTC (permalink / raw)
  To: Masaki Kanno; +Cc: xen-devel

On Mon, Feb 26, 2007 at 07:07:40PM +0900, Masaki Kanno wrote:

Content-Description: Mail message body
> Hi,
> 
> I resend the patch to solve the issue that I reported as follows. 
> 
> http://lists.xensource.com/archives/html/xen-devel/2007-02/msg00180.html
> 
> 
> The behavior of the xm create command isn't the specification, 
> is it?  If it is specification, I withdraw the patch. 
> Could you possibly comment or apply the patch? 
> 
> Signed-off-by: Masaki Kanno <kanno.masaki@jp.fujitsu.com>

Sorry, I thought I'd applied this one already, but clearly not.  It's applied
now.

Ewan.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2007-02-26 15:40 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-02-26 10:07 [PATCH][RESEND] Fix xm create command for wrong scheduler parameters Masaki Kanno
2007-02-26 15:40 ` Ewan Mellor

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.