Core Processor Topology
Wednesday March 12th, 2014By: CyrIngx2topology
The x2topology program enumerates the topology of the Core processor.
Data of each Core are retrieved through iterative calls of the CPUID instruction.
Illustrations
- Topology with Hyperthreading and 4 x Cores activated.
- Topology without Hyperthreading, with 4 x activated Cores.
- Topology with Hyperthreading and 2 x Cores activated.
- Topology without Hyperthreading and 1 only activated Core.
Build and Run the program
The instructions are specified in the wiki; the main steps are:
- Download the source code x2topology.c
- Compilation with gcc for Linux
- Execute the program
./x2topology
through a Shell script which processes all Cores,
./x2topology.sh
x2topology_np
x2topology_np.c is a new release of the program which set the Cores affinity through a call to the pthread_setaffinity_np() function.