Changeset 1646:01a8ceac8733

Show
Ignore:
Timestamp:
06/05/08 14:34:35 (3 months ago)
Author:
klai@…
Branch:
default
Message:

Fix calculation of number of cpus to handle hyper-threading (multiple threads of execution per core)

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • src/Tycoon/Virtualization/XenResources.py

    r1631 r1646  
    4747        cpu_info = self.__xen_main._xen_low_level.physinfo() 
    4848        num_cpus = (cpu_info['cores_per_socket'] * cpu_info['sockets_per_node']  
    49                     * cpu_info['nr_nodes']) 
     49                    * cpu_info['nr_nodes'] * cpu_info['threads_per_core']) 
    5050        del cpu_info['total_memory'], cpu_info['free_memory'] 
    5151