Skip to contentSkip to conversation

Fix xm start command

PATCH In review Masaki Kanno 1 participant 2 messages Jan 24, 2007 – Jan 28, 2007

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Fix xm start command

Hi,

When I tested the xm start command, I found a small bug. It's not able to set scheduler parameters (cpu_weight and cpu_cap).

# xm new /xen/vm1.conf cpu_weight=512 cpu_cap=150
Using config file "/xen/vm1.conf".
# xm start vm1
# xm sched-credit -d vm1
Name                              ID Weight Cap
vm1                                1    256    0

I fixed it. Test result is as follows.

# xm new /xen/vm1.conf cpu_weight=512 cpu_cap=150
Using config file "/xen/vm1.conf".
# xm start vm1
# xm sched-credit -d vm1
Name                              ID Weight Cap
vm1                                2    512  150

Best regards,
Kan

tools/python/xen/xend/XendDomain.py +3 -0
diff -r bea505a69722 tools/python/xen/xend/XendDomain.py
@@ -943,6 +943,9 @@ class XendDomain:
                                  POWER_STATE_NAMES[dominfo.state])
             
             dominfo.start(is_managed = True)
+            self.domain_sched_credit_set(dominfo.getDomid(),
+                                         dominfo.getWeight(),
+                                         dominfo.getCap())
         finally:
             self.domains_lock.release()
         dominfo.waitForDevices()

_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel

#1 lore raw

Hi,

Could you comment this patch? If no comment, I would appreciate it if you could apply this patch for the xm start command.

Best regards,
Kan

Quoted 34 lines

Hi,

When I tested the xm start command, I found a small bug. It's not able to set scheduler parameters (cpu_weight and cpu_cap).

# xm new /xen/vm1.conf cpu_weight=512 cpu_cap=150
Using config file "/xen/vm1.conf".
# xm start vm1
# xm sched-credit -d vm1
Name                              ID Weight Cap
vm1                                1    256    0

I fixed it. Test result is as follows.

# xm new /xen/vm1.conf cpu_weight=512 cpu_cap=150
Using config file "/xen/vm1.conf".
# xm start vm1
# xm sched-credit -d vm1
Name                              ID Weight Cap
vm1                                2    512  150

Best regards,
Kan

-------------------------------text/plain-------------------------------
_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel