Changeset 1688:4bd2c841cc4e
- Timestamp:
- 07/02/08 13:45:55 (3 months ago)
- Author:
- klai@…
- Children:
- 1689:90d63d87bfb8, 1692:fec0af2ae023
- Branch:
- default
- Message:
-
Fix CPU calculation (again) because Xen can't make up its mind
- Files:
-
Legend:
- Unmodified
- Added
- Removed
-
|
r1679
|
r1688
|
|
| 46 | 46 | |
| 47 | 47 | cpu_info = self.__xen_main._xen_low_level.physinfo() |
| 48 | | num_cpus = ( |
| | 48 | old_num_cpus = ( |
| 49 | 49 | cpu_info.get('nr_nodes', 1) * cpu_info.get('sockets_per_node', 1) |
| 50 | 50 | * cpu_info.get('cores_per_socket', 1) |
| 51 | 51 | * cpu_info.get('threads_per_core', 1)) |
| | 52 | num_cpus = cpu_info.get('nr_cpus', old_num_cpus) |
| 52 | 53 | del cpu_info['total_memory'], cpu_info['free_memory'] |
| 53 | 54 | |