Skip to contentSkip to conversation

Update VCPUs_live

PATCH New Masaki Kanno 1 participant 1 message Feb 16, 2009

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Update VCPUs_live

Hi,

XendConfig.py said about VCPUs_live as follows.

-- the number of VCPUs currently up, as reported by Xen.

But the value of VCPUs_live always is 1 till xm vcpu-set get executed. This patch updates VCPUs_live by using online_vcpus.

Best regards,
Kan

tools/python/xen/xend/XendConfig.py +2 -0
diff -r 09a6fa059b37 tools/python/xen/xend/XendConfig.py
@@ -431,6 +431,8 @@ class XendConfig(dict):
     def _vcpus_sanity_check(self):
         if 'VCPUs_max' in self and 'vcpu_avail' not in self:
             self['vcpu_avail'] = (1 << self['VCPUs_max']) - 1
+        if 'online_vcpus' in self:
+            self['VCPUs_live'] = self['online_vcpus']
 
     def _uuid_sanity_check(self):
         """Make sure UUID is in proper string format with hyphens."""

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