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





Turbo ratios calculation formula

Tuesday February 18th, 2014By: CyrIng

The formula used in xfreq.c to compute the Intel Core i7 Processor ratios is the following :

Ratio = TR × { d(URC) ÷ d(TSC) } × OR

where :

TR the TurboRatio = d(UCC) ÷ d(URC)
OR the OperatingRatio = MSR(MSR_PLATFORM_INFO[15-8])
UCC the Unhalted Core Cycles = MSR(IA32_FIXED_CTR1)
URC the Unhalted Reference Cycles = MSR(IA32_FIXED_CTR2)
TSC the Time Stamp Counter = MSR(IA32_TIME_STAMP_COUNTER)

The d(N) Delta function substracts the N values sampled at time period T(t) and T(t-1)

illustration :
                                                                          (t-1)           (t)
Cycles:  .......... T0 .......... T1 .......... T2 .......... T3 .......... T4 .......... T5 .......... T6
OR    :  .......... 12 .......... 12 .......... 20 .......... 12 .......... 12 .......... 20 .......... 12
TSC   :  ........ 2660 ........ 5320 ........ 7980 ....... 10640 ....... 13300 ....... 15960 ......  18620
                                                                         [ d(TSC) = 2660   ]
URC   :  ......... 200 .... "halted" ......... 201 ......... 202 ....... 2862 ......... 5522 ..... "halted"
                                                                         [ d(URC) = 2660   ]
UCC   :  ......... 100 .... "halted" .... "halted" .... "halted" ....... 2760 ......... 4090 ..... "halted"
                                                                         [ d(UCC) = 1330   ]

Ratio at time (t) is :

Ratio = (2660 ÷ 2660) × (1330 ÷ 2660) × 20
Ratio = 10

With a BCLK clock set to 133 MHz, the Core Processor frequency is given by :

Freq = 133 x 10
Freq = 1330 Mhz

CyrIng





A Live CD for XFreq

Monday February 17th, 2014By: CyrIng

XFreq is now supplied in a Live CD !

archlinux-xfreq.iso 510MB to download and burn to a CD or copy to any USB thumb key.

Restart the computer, choosing CD or USB key as the boot drive then select your locale, among English, French, German or Spanish.
You will go straight to an X Terminal.

ArchLinux-XFreq_1ArchLinux-XFreq_2

Enter the following commands :

  1. install-xfreq.sh : to install XFreq from its tar file.
  2. xfreq : to run XFreq (use argument -D 1 for a MDI window)
  3. update-xfreq.sh : to download the last release which is automatically compiled for you !

Remark. NMI Watchdog is disabled because it interferes with XFreq when reading counters :

echo "0" > /proc/sys/kernel/nmi_watchdog
cat /proc/sys/kernel/nmi_watchdog
0

If you want to contribute to XFreq, this Live CD is ready for development :

  • Code::Blocks 13.12
  • The Data display Debugger 3.3.12
  • gdb 7.7
  • gcc 4.8.2
  • Linux kernel 3.13.5 (including its documentation)

ArchLinux-XFreq_3

The XFreq working directory layout is as follow :

src/XFreq/xfreq.c [source code]
src/XFreq/xfreq.h [header]
src/XFreq/Makefile [command line compilation]
src/XFreq/README [project history]
src/XFreq/XFreq.cbp [codeblocks file]
src/XFreq/bin/xfreq [the exec file]

Please let us know about the results of this Live CD and the execution of XFreq. In your comments we will appreciate the feature of your system (processor model, RAM timings, BIOS readings)

 

— Edit —
Benchmark tools packed into the CD :

  • Phoronix Test Suite 4.8.6
  • Linpack (w/ source code)
  • cpuburn 1.4
  • 7-Zip 9.2 (w/ its integrated Benchmark 7zFM)
  • X11 Perf 1.5

The [Windows] key is associated with the window manager dwm and the following combinations:

  • [Win] + [R] to start an X Terminal
  • [Win] + [Menu] to open the list of programs
  • [Win] + left mouse button moves the window
  • [Win] + right-click to resize
  • [Win] + [Ctrl] + [F4] dwm ends and returns to the console (enter poweroff to turn off the computer)

Do a screenshot, record a video of your benchmark results with scrot and recordmydesktop.

filezilla and firefox included.

 

CyrIng









XFreq : a Core i7 Widget for Linux

Tuesday January 14th, 2014By: CyrIng

[ Nightly Build ]
Version 0.16 : new, an “All-in-One” window is available when starting with argument ‘-D 1′

  • MSR reading thread has been optimized.
  • One TSC is assigned per logical Core.
  • Added Processor features into System Information.
  • Attempt to display the temperature Thresholds #1 & #2

xfreq_16


Version 0.15 : Two new Widgets are available, while the Core Widget is enhanced with a Wallboard.

  • C-states
  • Temperature

xfreq_15-Core

xfreq_15-CStates

xfreq_15-Temps

The System Info Widget now gathers details about Processor, RAM and BIOS.

xfreq_15-SysInfo

The rest of the new features is displayed in the menu.

xfreq_15-Menu


Release 0.12 : Use the MSR performance counters to provide a better computation accuracy of the Cores frequency multiplier.


Release 0.11 : New pages added to display the specifications of the Processor, RAM, BIOS.
Btw, Help is available from [F1] key.

Release 0.10 : MSR optimisation ; double buffering
xfreq_10

Release 0.08 adds the Core DTS temperature.


A README file is available in the FTS





Widget XFreq

Sunday December 22nd, 2013By: CyrIng

  • The XFreq displays the frequencies of the i7 processor CPU cores
  • Programmed in multithread for the XLib,  the X-Window event loop is split from the thread which compute CPU frequencies.
  • Compile the source code then run it as root
    # xfreq 0 0 250 150 9x15 0x1010f0 0x00ffff 15 5