Software Tuning, Performance Optimization & Platform Monitoring
Discussion regarding monitoring and software tuning methodologies, Performance Monitoring Unit (PMU) of Intel microprocessors, and platform updating.

Unlocked Devil's Canyon/Skylake processor overclocking in Linux

Galim
Beginner
400 Views

Hello!

Is it possible to overclock modern processor like i7-4790k and i7-6700k in after-boot environment like linux?

I'm trying to disengage cpufreq governor and intel_pstate driver to write performance level directly into MSR's. But now I'm stuck with overclocking limit set by BIOS.

Somehow, maximum accepted ratio value is limited by the value preset by overclocking feature in BIOS.

I.e. I use overclocker's motherboard for i7-4790k and I configure BIOS with new raitio=46 for core turbo limits and viola - CPU runs on 4600MHz (overclocked both from base and from maximum stock turbo clocks). Now I can use MSR writes to set lower ratio to get lower freq, but I programming any higher ratio values results in actual ratio capped by previous BIOS settings.

Why? How and where BIOS sets some updated limits?

Also, I wasn't able to find any good datasheet-grade data about unlocked processor - what's exactly unlocked in "unlocked" K-SKUs?

Is it corrent that the only way to overclock i7 gen4 / gen6 is to raise turbo power limits and to program new values MSR_TURBO_RATIO_LIMIT? In other words, does overclocking always work via turbo boost and there are no overclocking with disabled turbo boost?

Here is turbostat's MSR log from i7-4790K processor, BIOS overclocked to ratio 46:

turbostat version 4.8 26-Sep, 2015 - Len Brown <lenb@kernel.org>
CPUID(0): GenuineIntel 13 CPUID levels; family:model:stepping 0x6:3c:3 (6:60:3)
CPUID(6): APERF, DTS, PTM, EPB
RAPL: 2979 sec. Joule Counter Range, at 88 Watts
cpu0: MSR_PLATFORM_INFO: 0x80838f3012800
8 * 100 = 800 MHz max efficiency frequency
40 * 100 = 4000 MHz base frequency
cpu0: MSR_IA32_POWER_CTL: 0x0004005d (C1E auto-promotion: DISabled)
cpu0: MSR_TURBO_RATIO_LIMIT: 0x2e2e2e2e
46 * 100 = 4600 MHz max turbo 4 active cores
46 * 100 = 4600 MHz max turbo 3 active cores
46 * 100 = 4600 MHz max turbo 2 active cores
46 * 100 = 4600 MHz max turbo 1 active cores
cpu0: MSR_CONFIG_TDP_NOMINAL: 0x00000028 (base_ratio=40)
cpu0: MSR_CONFIG_TDP_LEVEL_1: 0x00000000 ()
cpu0: MSR_CONFIG_TDP_LEVEL_2: 0x00000000 ()
cpu0: MSR_CONFIG_TDP_CONTROL: 0x80000000 ( lock=1)
cpu0: MSR_TURBO_ACTIVATION_RATIO: 0x00000000 (MAX_NON_TURBO_RATIO=0 lock=0)
cpu0: MSR_NHM_SNB_PKG_CST_CFG_CTL: 0x00000000 (UNlocked: pkg-cstate-limit=0: pc0)
cpu0: MSR_IA32_ENERGY_PERF_BIAS: 0x00000000 (performance)
cpu0: MSR_CORE_PERF_LIMIT_REASONS, 0x01200000 (Active: ) (Logged: Amps, Auto-HWP, )
cpu0: MSR_GFX_PERF_LIMIT_REASONS, 0x00000000 (Active: ) (Logged: )
cpu0: MSR_RING_PERF_LIMIT_REASONS, 0x0d000000 (Active: ) (Logged: Amps, PkgPwrL1, PkgPwrL2, )
cpu0: MSR_RAPL_POWER_UNIT: 0x000a0e03 (0.125000 Watts, 0.000061 Joules, 0.000977 sec.)
cpu0: MSR_PKG_POWER_INFO: 0x000002c0 (88 W TDP, RAPL 0 - 0 W, 0.000000 sec.)
cpu0: MSR_PKG_POWER_LIMIT: 0x42ffff001affff (UNlocked)
cpu0: PKG Limit #1: ENabled (4095.875000 Watts, 8.000000 sec, clamp DISabled)
cpu0: PKG Limit #2: ENabled (4095.875000 Watts, 0.002441* sec, clamp DISabled)
cpu0: MSR_PP0_POLICY: 0
cpu0: MSR_PP0_POWER_LIMIT: 0x00000000 (UNlocked)
cpu0: Cores Limit: DISabled (0.000000 Watts, 0.000977 sec, clamp DISabled)
cpu0: MSR_PP1_POLICY: 0
cpu0: MSR_PP1_POWER_LIMIT: 0x00000000 (UNlocked)
cpu0: GFX Limit: DISabled (0.000000 Watts, 0.000977 sec, clamp DISabled)
cpu0: MSR_IA32_TEMPERATURE_TARGET: 0x00641400 (100 C)
cpu0: MSR_IA32_PACKAGE_THERM_STATUS: 0x88310800 (51 C)
cpu0: MSR_IA32_THERM_STATUS: 0x88310000 (51 C +/- 1)
cpu1: MSR_IA32_THERM_STATUS: 0x88310000 (51 C +/- 1)
cpu2: MSR_IA32_THERM_STATUS: 0x88370000 (45 C +/- 1)
cpu3: MSR_IA32_THERM_STATUS: 0x88340000 (48 C +/- 1)
    Core     CPU Avg_MHz   %Busy Bzy_MHz TSC_MHz     SMI  CPU%c1  CPU%c3  CPU%c6  CPU%c7 CoreTmp  PkgTmp PkgWatt CorWatt GFXWatt
       -       -       1    0.01    4596    4000       0   99.99    0.00    0.00    0.00      51      51    1.61    0.00    0.00
       0       0       5    0.11    4598    4000       0   99.89    0.00    0.00    0.00      45      51    1.61    0.00    0.00
       0       4       0    0.00    4567    4000       0  100.00
       1       1       0    0.00    4580    4000       0  100.00    0.00    0.00    0.00      51
       1       5       0    0.00    4617    4000       0  100.00
       2       2       0    0.00    4492    4000       0  100.00    0.00    0.00    0.00      47
       2       6       0    0.00    4622    4000       0  100.00
       3       3       0    0.00    4551    4000       0  100.00    0.00    0.00    0.00      47
       3       7       0    0.00    4603    4000       0  100.00

Now, If I program new, (LOWER!) MSR limits to MSR 0x1AD or request another performance level to MSR 0x199, I see how current ratio changes in MSR 0x198 and directly observe freq change in turbostat. But only way I can go is to lower these ratios.

If I go higher than BIOS's preset values (like change from 46 to 47), I'm stuck with 47 in MSR 0x199, but 46 in MSR 0x198 and 4600MHz in turbostat.

Also, If I remove BIOS overclocking and write new MSR values of ratio 46 (perfectly working if set by BIOS), I'll never get any clocks faster than stock ones. It doesn't have anything with possible locks in MSR_PLATFORM_INFO[28] or MSR_TURBO_ACTIVATION_
RATIO[31] - both locks are released.

 

0 Kudos
2 Replies
Galim
Beginner
400 Views

So... Manual overclocking seem to be kind of super secret classified info?

0 Kudos
CyrIng
Novice
400 Views
Hello With my Nehalem processor, I have to write msr on all cores to change Turbo. Did you set all cores ?
0 Kudos
Reply