Skip to contentSkip to conversation

Fix to save CPU affinity for xm save/restore

PATCH New Masaki Kanno 1 participant 1 message Nov 14, 2008

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Fix to save CPU affinity for xm save/restore

Hi,

CPU affinity of a domain is saved into a checkpoint file by this patch, then VCPUs are repinned when the domain is restored.

# xm vcpu-list vm1
Name                                ID  VCPU   CPU State   Time(s) CPU Affinity
vm1                                 10     0     1   -b-      19.5 1
vm1                                 10     1     0   -b-      16.0 0
# xm save vm1 ~/vm1.checkpoint
# xm restore ~/vm1.checkpoint 
# xm vcpu-list vm1
Name                                ID  VCPU   CPU State   Time(s) CPU Affinity
vm1                                 11     0     1   -b-       0.0 1
vm1                                 11     1     0   -b-       0.0 0
# xm vcpu-list vm1
Name                                ID  VCPU   CPU State   Time(s) CPU Affinity
vm1                                 12     0     1   -b-      18.4 1
vm1                                 12     1     0   -b-      16.7 0
# xm suspend vm1
# xm vcpu-list vm1
Name                                ID  VCPU   CPU State   Time(s) CPU Affinity
vm1                                        0                   0.0 1
vm1                                        1                   0.0 0
# xm resume vm1
# xm vcpu-list vm1
Name                                ID  VCPU   CPU State   Time(s) CPU Affinity
vm1                                 13     0     1   -b-       0.0 1
vm1                                 13     1     0   -b-       0.0 0

Best regards,
Kan

tools/python/xen/xend/XendConfig.py +0 -2
diff -r 5fd51e1e9c79 tools/python/xen/xend/XendConfig.py
@@ -1032,8 +1032,6 @@ class XendConfig(dict):
                     sxpr.append([name, s])
 
         for xenapi, legacy in XENAPI_CFG_TO_LEGACY_CFG.items():
-            if legacy in ('cpus'): # skip this
-                continue
             if self.has_key(xenapi) and self[xenapi] not in (None, []):
                 if type(self[xenapi]) == bool:
                     # convert booleans to ints before making an sxp item

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