Core Processor Topology

Wednesday March 12th, 2014By: CyrIng

x2topology

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-with-htt-4xcores
  • Topology without Hyperthreading, with 4 x activated Cores.
    topology-without-htt-4xcores
  • Topology with Hyperthreading and 2 x Cores activated.
    topology-with-htt-2xcores
  • Topology without Hyperthreading and 1 only activated Core.
    topology-without-htt-1xcore

Build and Run the program

The instructions are specified in the wiki; the main steps are:

  1. Download the source code x2topology.c
  2. Compilation with gcc for Linux
  3. 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.

topology_np-with-htt-4xcores