Changeset 1655:687acb62067d
- Timestamp:
- 06/12/08 13:57:43 (2 months ago)
- Author:
- klai@…
- Branch:
- default
- Message:
-
Fix vcpu detection for archs that don't have all the Xen CPU info fields
- Files:
-
Legend:
- Unmodified
- Added
- Removed
-
|
r1646
|
r1655
|
|
| 46 | 46 | |
| 47 | 47 | cpu_info = self.__xen_main._xen_low_level.physinfo() |
| 48 | | num_cpus = (cpu_info['cores_per_socket'] * cpu_info['sockets_per_node'] |
| 49 | | * cpu_info['nr_nodes'] * cpu_info['threads_per_core']) |
| | 48 | num_cpus = ( |
| | 49 | cpu_info.get('nr_nodes', 1) * cpu_info.get('sockets_per_node', 1) |
| | 50 | * cpu_info.get('cores_per_socket', 1) |
| | 51 | * cpu_info.get('threads_per_core', 1)) |
| 50 | 52 | del cpu_info['total_memory'], cpu_info['free_memory'] |
| 51 | 53 | |