ASM:Topology
From Wiki.cyring.fr
(Difference between revisions)
		
		
 (→Build the Program)  | 
		 (→Running x2topology)  | 
		||
| Line 25: | Line 25: | ||
=== Running x2topology ===  | === Running x2topology ===  | ||
* ''Remark'': You may add your project directory to the executable PATH, or invoke x2topology with a '''./''' prefix (meaning in the current directory)  | * ''Remark'': You may add your project directory to the executable PATH, or invoke x2topology with a '''./''' prefix (meaning in the current directory)  | ||
| - | # Launch the   | + | # Launch the x2topology.sh script which iterates through all the '''enabled''' Cores  | 
<syntaxhighlight lang="bash">  | <syntaxhighlight lang="bash">  | ||
./x2topology.sh  | ./x2topology.sh  | ||
Revision as of 10:16, 12 March 2014
Contents | 
ACPI Extended Topology
Building the Program
Prerequesites
- The Linux Operating System.
 -  Any Linux package which provides the taskset command that allows the Processor affinity.
- ( util-linux if running ArchLinux. )
 
 - The GNU gcc C compiler.
 
Getting the Source Files
In the repository, download the following files in a project directory, such as x2topology
- x2topology.c
 - x2topology.sh
 - Optionally, the binary executable file : x2topology
 
Compile the Source File
- Compile the C source file
 
gcc x2topology.c -o x2topology
- Give the executable permission to the downloaded Bash script
 
chmod +x x2topology.shRunning x2topology
- Remark: You may add your project directory to the executable PATH, or invoke x2topology with a ./ prefix (meaning in the current directory)
 
- Launch the x2topology.sh script which iterates through all the enabled Cores
 
./x2topology.sh- Using a Core i7, Nehalem architecture, Hyper-threading and 4 Cores enabled, it outputs:
 
OS APIC Thread Core 0x1 0 0 0 0x2 2 0 1 0x4 4 0 2 0x8 6 0 3 0x10 1 1 0 0x20 3 1 1 0x40 5 1 2 0x80 7 1 3
- Using a Core i7, Nehalem architecture, Hyper-threading disabled and 4 Cores enabled, it outputs:
 
OS APIC Thread Core 0x1 0 0 0 0x2 2 0 1 0x4 4 0 2 0x8 6 0 3 0x10 0x20 0x40 0x80
- Using a Core i7, Nehalem architecture, Hyper-threading disabled and only 1 Core enabled (3 Cores disabled), it outputs:
 
OS APIC Thread Core 0x1 0 0 0 0x2 0x4 0x8 0x10 0x20 0x40 0x80
- x2topology, binary and shell script, can be lauched with a verbose option to get details:
 
./x2topology -v ./x2topology.sh -v