diff mbox series

intel_idle: Add ICL support

Message ID 20200826120421.44356-1-guilhem@barpilot.io (mailing list archive)
State RFC, archived
Headers show
Series intel_idle: Add ICL support | expand

Commit Message

Guilhem Lettron Aug. 26, 2020, 12:04 p.m. UTC
Use the same C-states as SKL

Signed-off-by: Guilhem Lettron <guilhem@barpilot.io>
---
 drivers/idle/intel_idle.c | 2 ++
 1 file changed, 2 insertions(+)

Comments

Rafael J. Wysocki Aug. 26, 2020, 12:43 p.m. UTC | #1
On Wed, Aug 26, 2020 at 2:05 PM Guilhem Lettron <guilhem@barpilot.io> wrote:
>
> Use the same C-states as SKL

Why is this change needed?

> Signed-off-by: Guilhem Lettron <guilhem@barpilot.io>
> ---
>  drivers/idle/intel_idle.c | 2 ++
>  1 file changed, 2 insertions(+)
>
> diff --git a/drivers/idle/intel_idle.c b/drivers/idle/intel_idle.c
> index 8e0fb1a5bdbd..1bb539f09a4f 100644
> --- a/drivers/idle/intel_idle.c
> +++ b/drivers/idle/intel_idle.c
> @@ -1145,6 +1145,8 @@ static const struct x86_cpu_id intel_idle_ids[] __initconst = {
>         X86_MATCH_INTEL_FAM6_MODEL(KABYLAKE_L,          &idle_cpu_skl),
>         X86_MATCH_INTEL_FAM6_MODEL(KABYLAKE,            &idle_cpu_skl),
>         X86_MATCH_INTEL_FAM6_MODEL(SKYLAKE_X,           &idle_cpu_skx),
> +       X86_MATCH_INTEL_FAM6_MODEL(ICELAKE,             &idle_cpu_skl),
> +       X86_MATCH_INTEL_FAM6_MODEL(ICELAKE_L,           &idle_cpu_skl),
>         X86_MATCH_INTEL_FAM6_MODEL(ICELAKE_X,           &idle_cpu_icx),
>         X86_MATCH_INTEL_FAM6_MODEL(XEON_PHI_KNL,        &idle_cpu_knl),
>         X86_MATCH_INTEL_FAM6_MODEL(XEON_PHI_KNM,        &idle_cpu_knl),
> --
> 2.27.0
>
Guilhem Lettron Aug. 26, 2020, 1:03 p.m. UTC | #2
On Wed, 26 Aug 2020 at 14:43, Rafael J. Wysocki <rafael@kernel.org> wrote:
>
> On Wed, Aug 26, 2020 at 2:05 PM Guilhem Lettron <guilhem@barpilot.io> wrote:
> >
> > Use the same C-states as SKL
>
> Why is this change needed?

On my laptop, a Dell XPS 13 7390 2-in-1 with i7-1065G7, ACPI only
report "C1_ACPI", "C2_ACPI" and "C3_ACPI".
After this patch I have "C1", "C1E", "C6", "C7s", "C8", "C9" and "C10".

I tested for some time on idle (without any application launched) and
battery consumption drop ~1W/2W.

But it can be a measurement problem or different context. So don't
hesitate to tell me if I look wrong or if ACPI is a better option for
this specific processor family.

> > Signed-off-by: Guilhem Lettron <guilhem@barpilot.io>
> > ---
> >  drivers/idle/intel_idle.c | 2 ++
> >  1 file changed, 2 insertions(+)
> >
> > diff --git a/drivers/idle/intel_idle.c b/drivers/idle/intel_idle.c
> > index 8e0fb1a5bdbd..1bb539f09a4f 100644
> > --- a/drivers/idle/intel_idle.c
> > +++ b/drivers/idle/intel_idle.c
> > @@ -1145,6 +1145,8 @@ static const struct x86_cpu_id intel_idle_ids[] __initconst = {
> >         X86_MATCH_INTEL_FAM6_MODEL(KABYLAKE_L,          &idle_cpu_skl),
> >         X86_MATCH_INTEL_FAM6_MODEL(KABYLAKE,            &idle_cpu_skl),
> >         X86_MATCH_INTEL_FAM6_MODEL(SKYLAKE_X,           &idle_cpu_skx),
> > +       X86_MATCH_INTEL_FAM6_MODEL(ICELAKE,             &idle_cpu_skl),
> > +       X86_MATCH_INTEL_FAM6_MODEL(ICELAKE_L,           &idle_cpu_skl),
> >         X86_MATCH_INTEL_FAM6_MODEL(ICELAKE_X,           &idle_cpu_icx),
> >         X86_MATCH_INTEL_FAM6_MODEL(XEON_PHI_KNL,        &idle_cpu_knl),
> >         X86_MATCH_INTEL_FAM6_MODEL(XEON_PHI_KNM,        &idle_cpu_knl),
> > --
> > 2.27.0
> >
Artem Bityutskiy Aug. 26, 2020, 1:09 p.m. UTC | #3
On Wed, 2020-08-26 at 15:03 +0200, Guilhem Lettron wrote:
> On Wed, 26 Aug 2020 at 14:43, Rafael J. Wysocki <rafael@kernel.org> wrote:
> > On Wed, Aug 26, 2020 at 2:05 PM Guilhem Lettron <guilhem@barpilot.io> wrote:
> > > Use the same C-states as SKL
> > 
> > Why is this change needed?
> 
> On my laptop, a Dell XPS 13 7390 2-in-1 with i7-1065G7, ACPI only
> report "C1_ACPI", "C2_ACPI" and "C3_ACPI".

Did you try to dig into the BIOS menus and check if you can enable
more/deeper C-states?

Artem.
Artem Bityutskiy Aug. 26, 2020, 1:16 p.m. UTC | #4
On Wed, 2020-08-26 at 15:03 +0200, Guilhem Lettron wrote:
> On Wed, 26 Aug 2020 at 14:43, Rafael J. Wysocki <rafael@kernel.org> wrote:
> > On Wed, Aug 26, 2020 at 2:05 PM Guilhem Lettron <guilhem@barpilot.io> wrote:
> > > Use the same C-states as SKL
> > 
> > Why is this change needed?
> 
> On my laptop, a Dell XPS 13 7390 2-in-1 with i7-1065G7, ACPI only
> report "C1_ACPI", "C2_ACPI" and "C3_ACPI".

Also, if you could runt turbostat - we could see which _actual_ HW C-
states are used on your system, which Package C-states are reached.

Just get a reasonably new turbostat (it is part of the kernel tree, you
can compile it yourself) and run it for few seconds (like 'turbostat
sleep 10'), get the output (will be a lot of it), and we can check what
is actually going on with regards to C-states.

Artem.
Rafael J. Wysocki Aug. 26, 2020, 1:17 p.m. UTC | #5
On Wed, Aug 26, 2020 at 2:59 PM Guilhem Lettron <guilhem@barpilot.io> wrote:
>
> On my laptop, a Dell XPS 13 7390 2-in-1 with i7-1065G7, ACPI only report "C1_ACPI", "C2_ACPI" and "C3_ACPI".

Can you list the properties of the idle states in this configuration, that is:

$ grep -r '.*' /sys/devices/system/cpu/cpu0/cpuidle/state1/

and analogously for state2 and state3, and send the output of this?

On my desktop system the above comment produces the following output:

/sys/devices/system/cpu/cpu0/cpuidle/state1/disable:0
/sys/devices/system/cpu/cpu0/cpuidle/state1/above:1022634
/sys/devices/system/cpu/cpu0/cpuidle/state1/time:2556533185
/sys/devices/system/cpu/cpu0/cpuidle/state1/power:0
/sys/devices/system/cpu/cpu0/cpuidle/state1/residency:2
/sys/devices/system/cpu/cpu0/cpuidle/state1/latency:2
/sys/devices/system/cpu/cpu0/cpuidle/state1/usage:17625391
/sys/devices/system/cpu/cpu0/cpuidle/state1/desc:MWAIT 0x00
/sys/devices/system/cpu/cpu0/cpuidle/state1/below:6578613
/sys/devices/system/cpu/cpu0/cpuidle/state1/default_status:enabled
/sys/devices/system/cpu/cpu0/cpuidle/state1/name:C1
/sys/devices/system/cpu/cpu0/cpuidle/state1/s2idle/time:0
/sys/devices/system/cpu/cpu0/cpuidle/state1/s2idle/usage:0

Thanks!
Artem Bityutskiy Aug. 26, 2020, 1:18 p.m. UTC | #6
On Wed, 2020-08-26 at 16:16 +0300, Artem Bityutskiy wrote:
> Just get a reasonably new turbostat (it is part of the kernel tree, you
> can compile it yourself) and run it for few seconds (like 'turbostat
> sleep 10'), get the output (will be a lot of it), and we can check what
> is actually going on with regards to C-states.

Oh, and if you could do that with and without your patch, we could even
compare things. But try to do it at least with the default (acpi_idle)
configuration.

Artem.
Guilhem Lettron Aug. 26, 2020, 1:19 p.m. UTC | #7
On Wed, 26 Aug 2020 at 15:09, Artem Bityutskiy <dedekind1@gmail.com> wrote:
>
> On Wed, 2020-08-26 at 15:03 +0200, Guilhem Lettron wrote:
> > On my laptop, a Dell XPS 13 7390 2-in-1 with i7-1065G7, ACPI only
> > report "C1_ACPI", "C2_ACPI" and "C3_ACPI".
>
> Did you try to dig into the BIOS menus and check if you can enable
> more/deeper C-states?

Yes everything is enabled relative to C-states.
I find, at least, 1 people with same problem:
https://community.clearlinux.org/t/intel-idle-on-10th-ice-lake/3939/9

>
> Artem.
>

Guilhem Lettron
Rafael J. Wysocki Aug. 26, 2020, 1:20 p.m. UTC | #8
On Wed, Aug 26, 2020 at 3:09 PM Artem Bityutskiy <dedekind1@gmail.com> wrote:
>
> On Wed, 2020-08-26 at 15:03 +0200, Guilhem Lettron wrote:
> > On Wed, 26 Aug 2020 at 14:43, Rafael J. Wysocki <rafael@kernel.org> wrote:
> > > On Wed, Aug 26, 2020 at 2:05 PM Guilhem Lettron <guilhem@barpilot.io> wrote:
> > > > Use the same C-states as SKL
> > >
> > > Why is this change needed?
> >
> > On my laptop, a Dell XPS 13 7390 2-in-1 with i7-1065G7, ACPI only
> > report "C1_ACPI", "C2_ACPI" and "C3_ACPI".
>
> Did you try to dig into the BIOS menus and check if you can enable
> more/deeper C-states?

I would be surprised if there were settings for that in the BIOS, as
Windows only expects #1, C2 and C3 AFAICS.

It might be possible to disable C1E autopromotion, but that option is
not likely to be available on a laptop.

Cheers!
Rafael J. Wysocki Aug. 26, 2020, 1:21 p.m. UTC | #9
On Wed, Aug 26, 2020 at 3:18 PM Artem Bityutskiy <dedekind1@gmail.com> wrote:
>
> On Wed, 2020-08-26 at 16:16 +0300, Artem Bityutskiy wrote:
> > Just get a reasonably new turbostat (it is part of the kernel tree, you
> > can compile it yourself) and run it for few seconds (like 'turbostat
> > sleep 10'), get the output (will be a lot of it), and we can check what
> > is actually going on with regards to C-states.
>
> Oh, and if you could do that with and without your patch, we could even
> compare things. But try to do it at least with the default (acpi_idle)
> configuration.

IMO it is way easier to get the information from sysfs.
Guilhem Lettron Aug. 26, 2020, 1:32 p.m. UTC | #10
On Wed, 26 Aug 2020 at 15:18, Artem Bityutskiy <dedekind1@gmail.com> wrote:
>
> On Wed, 2020-08-26 at 16:16 +0300, Artem Bityutskiy wrote:
> > Just get a reasonably new turbostat (it is part of the kernel tree, you
> > can compile it yourself) and run it for few seconds (like 'turbostat
> > sleep 10'), get the output (will be a lot of it), and we can check what
> > is actually going on with regards to C-states.
>
> Oh, and if you could do that with and without your patch, we could even
> compare things. But try to do it at least with the default (acpi_idle)
> configuration.

with my patch:

turbostat version 20.03.20 - Len Brown <lenb@kernel.org>
CPUID(0): GenuineIntel 0x1b CPUID levels; 0x80000008 xlevels;
family:model:stepping 0x6:7e:5 (6:126:5)
CPUID(1): SSE3 MONITOR - EIST TM2 TSC MSR ACPI-TM HT TM
CPUID(6): APERF, TURBO, DTS, PTM, HWP, No-HWPnotify, HWPwindow,
HWPepp, HWPpkg, EPB
cpu2: MSR_IA32_MISC_ENABLE: 0x00850089 (TCC EIST MWAIT PREFETCH TURBO)
CPUID(7): SGX
cpu2: MSR_IA32_FEATURE_CONTROL: 0x00020005 (Locked )
CPUID(0x15): eax_crystal: 2 ebx_tsc: 78 ecx_crystal_hz: 38400000
TSC: 1497 MHz (38400000 Hz * 78 / 2 / 1000000)
CPUID(0x16): base_mhz: 1500 max_mhz: 3900 bus_mhz: 100
cpu2: MSR_MISC_PWR_MGMT: 0x00401c40 (ENable-EIST_Coordination
DISable-EPB DISable-OOB)
RAPL: 17476 sec. Joule Counter Range, at 15 Watts
cpu2: MSR_PLATFORM_INFO: 0x4043cf1810f00
4 * 100.0 = 400.0 MHz max efficiency frequency
15 * 100.0 = 1500.0 MHz base frequency
cpu2: MSR_IA32_POWER_CTL: 0x0024005d (C1E auto-promotion: DISabled)
cpu2: MSR_TURBO_RATIO_LIMIT: 0x2323232323232627
35 * 100.0 = 3500.0 MHz max turbo 8 active cores
35 * 100.0 = 3500.0 MHz max turbo 7 active cores
35 * 100.0 = 3500.0 MHz max turbo 6 active cores
35 * 100.0 = 3500.0 MHz max turbo 5 active cores
35 * 100.0 = 3500.0 MHz max turbo 4 active cores
35 * 100.0 = 3500.0 MHz max turbo 3 active cores
38 * 100.0 = 3800.0 MHz max turbo 2 active cores
39 * 100.0 = 3900.0 MHz max turbo 1 active cores
cpu2: MSR_CONFIG_TDP_NOMINAL: 0x0000000d (base_ratio=13)
cpu2: MSR_CONFIG_TDP_LEVEL_1: 0x000a0060 (PKG_MIN_PWR_LVL1=0
PKG_MAX_PWR_LVL1=0 LVL1_RATIO=10 PKG_TDP_LVL1=96)
cpu2: MSR_CONFIG_TDP_LEVEL_2: 0x000f00c8 (PKG_MIN_PWR_LVL2=0
PKG_MAX_PWR_LVL2=0 LVL2_RATIO=15 PKG_TDP_LVL2=200)
cpu2: MSR_CONFIG_TDP_CONTROL: 0x00000000 ( lock=0)
cpu2: MSR_TURBO_ACTIVATION_RATIO: 0x0000000c (MAX_NON_TURBO_RATIO=12 lock=0)
cpu2: MSR_PKG_CST_CONFIG_CONTROL: 0x74008008 (UNdemote-C1, demote-C1,
locked, pkg-cstate-limit=8 (unlimited))
current_driver: intel_idle
current_governor: menu
current_governor_ro: menu
cpu2: POLL: CPUIDLE CORE POLL IDLE
cpu2: C1: MWAIT 0x00
cpu2: C1E: MWAIT 0x01
cpu2: C6: MWAIT 0x20
cpu2: C7s: MWAIT 0x33
cpu2: C8: MWAIT 0x40
cpu2: C9: MWAIT 0x50
cpu2: C10: MWAIT 0x60
cpu2: cpufreq driver: intel_cpufreq
cpu2: cpufreq governor: schedutil
cpufreq intel_pstate no_turbo: 0
cpu2: MSR_MISC_FEATURE_CONTROL: 0x00000000 (L2-Prefetch
L2-Prefetch-pair L1-Prefetch L1-IP-Prefetch)
cpu0: MSR_PM_ENABLE: 0x00000001 (HWP)
cpu0: MSR_HWP_CAPABILITIES: 0x010e0d27 (high 39 guar 13 eff 14 low 1)
cpu0: MSR_HWP_REQUEST: 0x80002727 (min 39 max 39 des 0 epp 0x80 window
0x0 pkg 0x0)
cpu0: MSR_HWP_REQUEST_PKG: 0x8000ff01 (min 1 max 255 des 0 epp 0x80 window 0x0)
cpu0: MSR_HWP_STATUS: 0x00000000 (No-Guaranteed_Perf_Change, No-Excursion_Min)
cpu0: MSR_IA32_ENERGY_PERF_BIAS: 0x00000006 (balanced)
cpu0: MSR_RAPL_POWER_UNIT: 0x000a0e03 (0.125000 Watts, 0.000061
Joules, 0.000977 sec.)
cpu0: MSR_PKG_POWER_INFO: 0x00000078 (15 W TDP, RAPL 0 - 0 W, 0.000000 sec.)
cpu0: MSR_PKG_POWER_LIMIT: 0x5a8118009d80c8 (UNlocked)
cpu0: PKG Limit #1: ENabled (25.000000 Watts, 24.000000 sec, clamp ENabled)
cpu0: PKG Limit #2: ENabled (35.000000 Watts, 10.000000* sec, clamp DISabled)
cpu0: MSR_DRAM_POWER_LIMIT: 0x5400de00000000 (UNlocked)
cpu0: DRAM Limit: DISabled (0.000000 Watts, 0.000977 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: 0x05640000 (100 C)
cpu0: MSR_IA32_PACKAGE_THERM_STATUS: 0x88290800 (59 C)
cpu0: MSR_IA32_PACKAGE_THERM_INTERRUPT: 0x00000003 (100 C, 100 C)
cpu2: MSR_PKGC3_IRTL: 0x00000000 (NOTvalid, 0 ns)
cpu2: MSR_PKGC6_IRTL: 0x00000000 (NOTvalid, 0 ns)
cpu2: MSR_PKGC7_IRTL: 0x00000000 (NOTvalid, 0 ns)
cpu2: MSR_PKGC8_IRTL: 0x00000000 (NOTvalid, 0 ns)
cpu2: MSR_PKGC9_IRTL: 0x00000000 (NOTvalid, 0 ns)
cpu2: MSR_PKGC10_IRTL: 0x00000000 (NOTvalid, 0 ns)
10.003466 sec
Core CPU Avg_MHz Busy% Bzy_MHz TSC_MHz IRQ SMI POLL C1 C1E C6 C7s C8
C9 C10 POLL% C1% C1E% C6% C7s% C8% C9% C10% CPU%c1 CPU%c6 CPU%c7
CoreTmp PkgTmp GFX%rc6 GFXMHz Totl%C0 Any%C0 GFX%C0 CPUGFX% Pkg%pc2
Pkg%pc3 Pkg%pc6 Pkg%pc7 Pkg%pc8 Pkg%pc9 Pk%pc10 CPU%LPI SYS%LPI
PkgWatt CorWatt GFXWatt RAMWatt PKG_% RAM_%
- - 219 8.59 2549 1498 48489 160 71 1256 11389 21414 5 31317 489 8252
0.00 0.10 1.61 17.26 0.01 52.02 0.53 19.27 16.07 26.24 49.10 56 56
96.64 300 68.29 48.58 3.08 2.10 30.36 0.04 0.00 0.00 0.00 0.00 0.00
0.00 0.00 7.38 4.91 0.07 0.00 0.00 0.00
0 0 189 5.83 3239 1498 6131 20 26 222 1922 2648 0 4232 0 298 0.00 0.20
1.97 16.85 0.00 69.76 0.00 4.51 20.30 20.57 53.30 56 56 96.64 300
68.29 48.58 3.08 2.10 30.36 0.04 0.00 0.00 0.00 0.00 0.00 0.00 0.00
7.38 4.91 0.07 0.00 0.00 0.00
0 4 397 12.02 3307 1498 4248 20 5 173 1252 1552 0 3266 2 1367 0.00
0.08 1.22 10.13 0.00 46.47 0.01 28.39 14.11
1 1 302 8.53 3545 1498 6108 20 11 155 1215 3588 0 4462 0 2 0.00 0.11
1.90 28.91 0.00 59.04 0.00 0.08 14.13 31.04 46.31 55
1 5 149 6.29 2378 1498 3953 20 8 144 1391 1710 0 3239 9 1304 0.00 0.06
1.48 10.45 0.00 49.50 0.23 31.45 16.37
2 2 159 7.86 2022 1498 3688 20 5 111 1088 1450 0 3122 1 1191 0.00 0.14
0.95 9.49 0.00 49.73 0.07 31.64 13.61 19.24 59.29 54
2 6 175 7.44 2355 1498 6107 20 4 137 1726 2424 0 3863 4 651 0.00 0.06
1.90 15.83 0.00 56.39 0.04 18.00 14.03
3 3 213 11.84 1797 1498 13814 20 7 170 1431 6125 2 5634 464 2422 0.00
0.09 1.89 34.67 0.01 31.54 3.82 16.28 16.54 34.11 37.51 52
3 7 167 8.91 1871 1498 4440 20 5 144 1364 1917 3 3499 9 1017 0.00 0.07
1.55 11.78 0.03 53.73 0.07 23.83 19.47

without (3.9-rc2):

turbostat version 20.03.20 - Len Brown <lenb@kernel.org>
CPUID(0): GenuineIntel 0x1b CPUID levels; 0x80000008 xlevels;
family:model:stepping 0x6:7e:5 (6:126:5)
CPUID(1): SSE3 MONITOR - EIST TM2 TSC MSR ACPI-TM HT TM
CPUID(6): APERF, TURBO, DTS, PTM, HWP, No-HWPnotify, HWPwindow,
HWPepp, HWPpkg, EPB
cpu1: MSR_IA32_MISC_ENABLE: 0x00850089 (TCC EIST MWAIT PREFETCH TURBO)
CPUID(7): SGX
cpu1: MSR_IA32_FEATURE_CONTROL: 0x00020005 (Locked )
CPUID(0x15): eax_crystal: 2 ebx_tsc: 78 ecx_crystal_hz: 38400000
TSC: 1497 MHz (38400000 Hz * 78 / 2 / 1000000)
CPUID(0x16): base_mhz: 1500 max_mhz: 3900 bus_mhz: 100
cpu1: MSR_MISC_PWR_MGMT: 0x00401c40 (ENable-EIST_Coordination
DISable-EPB DISable-OOB)
RAPL: 17476 sec. Joule Counter Range, at 15 Watts
cpu1: MSR_PLATFORM_INFO: 0x4043cf1810f00
4 * 100.0 = 400.0 MHz max efficiency frequency
15 * 100.0 = 1500.0 MHz base frequency
cpu1: MSR_IA32_POWER_CTL: 0x0024005f (C1E auto-promotion: ENabled)
cpu1: MSR_TURBO_RATIO_LIMIT: 0x2323232323232627
35 * 100.0 = 3500.0 MHz max turbo 8 active cores
35 * 100.0 = 3500.0 MHz max turbo 7 active cores
35 * 100.0 = 3500.0 MHz max turbo 6 active cores
35 * 100.0 = 3500.0 MHz max turbo 5 active cores
35 * 100.0 = 3500.0 MHz max turbo 4 active cores
35 * 100.0 = 3500.0 MHz max turbo 3 active cores
38 * 100.0 = 3800.0 MHz max turbo 2 active cores
39 * 100.0 = 3900.0 MHz max turbo 1 active cores
cpu1: MSR_CONFIG_TDP_NOMINAL: 0x0000000d (base_ratio=13)
cpu1: MSR_CONFIG_TDP_LEVEL_1: 0x000a0060 (PKG_MIN_PWR_LVL1=0
PKG_MAX_PWR_LVL1=0 LVL1_RATIO=10 PKG_TDP_LVL1=96)
cpu1: MSR_CONFIG_TDP_LEVEL_2: 0x000f00c8 (PKG_MIN_PWR_LVL2=0
PKG_MAX_PWR_LVL2=0 LVL2_RATIO=15 PKG_TDP_LVL2=200)
cpu1: MSR_CONFIG_TDP_CONTROL: 0x00000000 ( lock=0)
cpu1: MSR_TURBO_ACTIVATION_RATIO: 0x0000000c (MAX_NON_TURBO_RATIO=12 lock=0)
cpu1: MSR_PKG_CST_CONFIG_CONTROL: 0x74008008 (UNdemote-C1, demote-C1,
locked, pkg-cstate-limit=8 (unlimited))
current_driver: intel_idle
current_governor: menu
current_governor_ro: menu
cpu1: POLL: CPUIDLE CORE POLL IDLE
cpu1: C1_ACPI: ACPI FFH MWAIT 0x0
cpu1: C2_ACPI: ACPI FFH MWAIT 0x31
cpu1: C3_ACPI: ACPI FFH MWAIT 0x60
cpu1: cpufreq driver: intel_cpufreq
cpu1: cpufreq governor: schedutil
cpufreq intel_pstate no_turbo: 0
cpu1: MSR_MISC_FEATURE_CONTROL: 0x00000000 (L2-Prefetch
L2-Prefetch-pair L1-Prefetch L1-IP-Prefetch)
cpu0: MSR_PM_ENABLE: 0x00000001 (HWP)
cpu0: MSR_HWP_CAPABILITIES: 0x010e0d27 (high 39 guar 13 eff 14 low 1)
cpu0: MSR_HWP_REQUEST: 0x80002727 (min 39 max 39 des 0 epp 0x80 window
0x0 pkg 0x0)
cpu0: MSR_HWP_REQUEST_PKG: 0x8000ff01 (min 1 max 255 des 0 epp 0x80 window 0x0)
cpu0: MSR_HWP_STATUS: 0x00000000 (No-Guaranteed_Perf_Change, No-Excursion_Min)
cpu0: MSR_IA32_ENERGY_PERF_BIAS: 0x00000006 (balanced)
cpu0: MSR_RAPL_POWER_UNIT: 0x000a0e03 (0.125000 Watts, 0.000061
Joules, 0.000977 sec.)
cpu0: MSR_PKG_POWER_INFO: 0x00000078 (15 W TDP, RAPL 0 - 0 W, 0.000000 sec.)
cpu0: MSR_PKG_POWER_LIMIT: 0x42817000dd8170 (UNlocked)
cpu0: PKG Limit #1: ENabled (46.000000 Watts, 28.000000 sec, clamp ENabled)
cpu0: PKG Limit #2: ENabled (46.000000 Watts, 0.002441* sec, clamp DISabled)
cpu0: MSR_DRAM_POWER_LIMIT: 0x5400de00000000 (UNlocked)
cpu0: DRAM Limit: DISabled (0.000000 Watts, 0.000977 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: 0x00640000 (100 C)
cpu0: MSR_IA32_PACKAGE_THERM_STATUS: 0x881d0800 (71 C)
cpu0: MSR_IA32_PACKAGE_THERM_INTERRUPT: 0x00000003 (100 C, 100 C)
cpu1: MSR_PKGC3_IRTL: 0x00000000 (NOTvalid, 0 ns)
cpu1: MSR_PKGC6_IRTL: 0x00000000 (NOTvalid, 0 ns)
cpu1: MSR_PKGC7_IRTL: 0x00000000 (NOTvalid, 0 ns)
cpu1: MSR_PKGC8_IRTL: 0x00000000 (NOTvalid, 0 ns)
cpu1: MSR_PKGC9_IRTL: 0x00000000 (NOTvalid, 0 ns)
cpu1: MSR_PKGC10_IRTL: 0x00000000 (NOTvalid, 0 ns)
10.002424 sec
Core CPU Avg_MHz Busy% Bzy_MHz TSC_MHz IRQ SMI POLL C1_ACPI C2_ACPI
C3_ACPI POLL% C1_ACPI% C2_ACPI% C3_ACPI% CPU%c1 CPU%c6 CPU%c7 CoreTmp
PkgTmp GFX%rc6 GFXMHz Totl%C0 Any%C0 GFX%C0 CPUGFX% Pkg%pc2 Pkg%pc3
Pkg%pc6 Pkg%pc7 Pkg%pc8 Pkg%pc9 Pk%pc10 CPU%LPI SYS%LPI PkgWatt
CorWatt GFXWatt RAMWatt PKG_% RAM_%
- - 204 9.81 2083 1497 50389 176 820 25733 20628 14751 0.01 10.71
36.19 42.84 29.48 0.00 60.71 58 58 97.96 300 73.65 52.84 1.861.41
16.96 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 6.08 3.79 0.03 0.00 0.00
0.00
0 0 218 7.90 2760 1497 6824 22 4 3882 3146 864 0.00 12.68 53.86 24.76
26.32 0.00 65.77 58 58 97.96 300 73.65 52.84 1.861.41 16.96 0.00 0.00
0.00 0.00 0.00 0.00 0.00 0.00 6.08 3.79 0.03 0.00 0.00 0.00
0 4 144 6.91 2084 1497 4409 22 7 2410 2078 1608 0.00 7.55 32.26 52.88 27.32
1 1 154 8.09 1903 1497 4783 22 3 2528 2178 1801 0.00 7.54 34.66 49.51
42.41 0.00 49.50 57
1 5 290 14.49 2000 1497 14750 22 755 5964 4261 4558 0.04 22.47 27.57 35.05 36.01
2 2 209 11.35 1840 1497 4663 22 1 2771 2132 1467 0.00 8.39 31.37 48.69
28.70 0.00 59.96 55
2 6 232 13.35 1738 1497 5625 22 40 3313 2140 1338 0.00 10.36 33.13 42.87 26.70
3 3 221 9.01 2451 1497 4944 22 7 2627 2536 1447 0.00 9.32 41.41 39.55
23.38 0.00 67.61 54
3 7 167 7.39 2266 1497 4391 22 3 2238 2157 1668 0.00 7.39 35.25 49.42 25.00


>
> Artem.
>

Guilhem Lettron
Guilhem Lettron Aug. 26, 2020, 1:34 p.m. UTC | #11
On Wed, 26 Aug 2020 at 15:17, Rafael J. Wysocki <rafael@kernel.org> wrote:
>
> On Wed, Aug 26, 2020 at 2:59 PM Guilhem Lettron <guilhem@barpilot.io> wrote:
> >
> > On my laptop, a Dell XPS 13 7390 2-in-1 with i7-1065G7, ACPI only report "C1_ACPI", "C2_ACPI" and "C3_ACPI".
>
> Can you list the properties of the idle states in this configuration, that is:
>
> $ grep -r '.*' /sys/devices/system/cpu/cpu0/cpuidle/state1/
>
> and analogously for state2 and state3, and send the output of this?
>
> On my desktop system the above comment produces the following output:
>
> /sys/devices/system/cpu/cpu0/cpuidle/state1/disable:0
> /sys/devices/system/cpu/cpu0/cpuidle/state1/above:1022634
> /sys/devices/system/cpu/cpu0/cpuidle/state1/time:2556533185
> /sys/devices/system/cpu/cpu0/cpuidle/state1/power:0
> /sys/devices/system/cpu/cpu0/cpuidle/state1/residency:2
> /sys/devices/system/cpu/cpu0/cpuidle/state1/latency:2
> /sys/devices/system/cpu/cpu0/cpuidle/state1/usage:17625391
> /sys/devices/system/cpu/cpu0/cpuidle/state1/desc:MWAIT 0x00
> /sys/devices/system/cpu/cpu0/cpuidle/state1/below:6578613
> /sys/devices/system/cpu/cpu0/cpuidle/state1/default_status:enabled
> /sys/devices/system/cpu/cpu0/cpuidle/state1/name:C1
> /sys/devices/system/cpu/cpu0/cpuidle/state1/s2idle/time:0
> /sys/devices/system/cpu/cpu0/cpuidle/state1/s2idle/usage:0
>
> Thanks!

grep -r '.*' /sys/devices/system/cpu/cpu0/cpuidle/state1/

/sys/devices/system/cpu/cpu0/cpuidle/state1/disable:0
/sys/devices/system/cpu/cpu0/cpuidle/state1/above:524
/sys/devices/system/cpu/cpu0/cpuidle/state1/time:63400881
/sys/devices/system/cpu/cpu0/cpuidle/state1/power:0
/sys/devices/system/cpu/cpu0/cpuidle/state1/residency:1
/sys/devices/system/cpu/cpu0/cpuidle/state1/latency:1
/sys/devices/system/cpu/cpu0/cpuidle/state1/usage:195432
/sys/devices/system/cpu/cpu0/cpuidle/state1/desc:ACPI FFH MWAIT 0x0
/sys/devices/system/cpu/cpu0/cpuidle/state1/below:27374
/sys/devices/system/cpu/cpu0/cpuidle/state1/default_status:enabled
/sys/devices/system/cpu/cpu0/cpuidle/state1/name:C1_ACPI
/sys/devices/system/cpu/cpu0/cpuidle/state1/s2idle/time:0
/sys/devices/system/cpu/cpu0/cpuidle/state1/s2idle/usage:0

grep -r '.*' /sys/devices/system/cpu/cpu0/cpuidle/state2/

/sys/devices/system/cpu/cpu0/cpuidle/state2/disable:0
/sys/devices/system/cpu/cpu0/cpuidle/state2/above:43616
/sys/devices/system/cpu/cpu0/cpuidle/state2/time:144893598
/sys/devices/system/cpu/cpu0/cpuidle/state2/power:0
/sys/devices/system/cpu/cpu0/cpuidle/state2/residency:759
/sys/devices/system/cpu/cpu0/cpuidle/state2/latency:253
/sys/devices/system/cpu/cpu0/cpuidle/state2/usage:102740
/sys/devices/system/cpu/cpu0/cpuidle/state2/desc:ACPI FFH MWAIT 0x31
/sys/devices/system/cpu/cpu0/cpuidle/state2/below:11351
/sys/devices/system/cpu/cpu0/cpuidle/state2/default_status:enabled
/sys/devices/system/cpu/cpu0/cpuidle/state2/name:C2_ACPI
/sys/devices/system/cpu/cpu0/cpuidle/state2/s2idle/time:0
/sys/devices/system/cpu/cpu0/cpuidle/state2/s2idle/usage:0

grep -r '.*' /sys/devices/system/cpu/cpu0/cpuidle/state3/

/sys/devices/system/cpu/cpu0/cpuidle/state3/disable:0
/sys/devices/system/cpu/cpu0/cpuidle/state3/above:18551
/sys/devices/system/cpu/cpu0/cpuidle/state3/time:43225299
/sys/devices/system/cpu/cpu0/cpuidle/state3/power:0
/sys/devices/system/cpu/cpu0/cpuidle/state3/residency:3144
/sys/devices/system/cpu/cpu0/cpuidle/state3/latency:1048
/sys/devices/system/cpu/cpu0/cpuidle/state3/usage:24205
/sys/devices/system/cpu/cpu0/cpuidle/state3/desc:ACPI FFH MWAIT 0x60
/sys/devices/system/cpu/cpu0/cpuidle/state3/below:0
/sys/devices/system/cpu/cpu0/cpuidle/state3/default_status:enabled
/sys/devices/system/cpu/cpu0/cpuidle/state3/name:C3_ACPI
/sys/devices/system/cpu/cpu0/cpuidle/state3/s2idle/time:0
/sys/devices/system/cpu/cpu0/cpuidle/state3/s2idle/usage:0

Guilhem Lettron
Zhang, Rui Aug. 26, 2020, 1:41 p.m. UTC | #12
On Wed, 2020-08-26 at 15:32 +0200, Guilhem Lettron wrote:
> On Wed, 26 Aug 2020 at 15:18, Artem Bityutskiy <dedekind1@gmail.com>
> wrote:
> > 
> > On Wed, 2020-08-26 at 16:16 +0300, Artem Bityutskiy wrote:
> > > Just get a reasonably new turbostat (it is part of the kernel
> > > tree, you
> > > can compile it yourself) and run it for few seconds (like
> > > 'turbostat
> > > sleep 10'), get the output (will be a lot of it), and we can
> > > check what
> > > is actually going on with regards to C-states.
> > 
> > Oh, and if you could do that with and without your patch, we could
> > even
> > compare things. But try to do it at least with the default
> > (acpi_idle)
> > configuration.
> 
> with my patch:
> 
> turbostat version 20.03.20 - Len Brown <lenb@kernel.org>
> CPUID(0): GenuineIntel 0x1b CPUID levels; 0x80000008 xlevels;
> family:model:stepping 0x6:7e:5 (6:126:5)
> CPUID(1): SSE3 MONITOR - EIST TM2 TSC MSR ACPI-TM HT TM
> CPUID(6): APERF, TURBO, DTS, PTM, HWP, No-HWPnotify, HWPwindow,
> HWPepp, HWPpkg, EPB
> cpu2: MSR_IA32_MISC_ENABLE: 0x00850089 (TCC EIST MWAIT PREFETCH
> TURBO)
> CPUID(7): SGX
> cpu2: MSR_IA32_FEATURE_CONTROL: 0x00020005 (Locked )
> CPUID(0x15): eax_crystal: 2 ebx_tsc: 78 ecx_crystal_hz: 38400000
> TSC: 1497 MHz (38400000 Hz * 78 / 2 / 1000000)
> CPUID(0x16): base_mhz: 1500 max_mhz: 3900 bus_mhz: 100
> cpu2: MSR_MISC_PWR_MGMT: 0x00401c40 (ENable-EIST_Coordination
> DISable-EPB DISable-OOB)
> RAPL: 17476 sec. Joule Counter Range, at 15 Watts
> cpu2: MSR_PLATFORM_INFO: 0x4043cf1810f00
> 4 * 100.0 = 400.0 MHz max efficiency frequency
> 15 * 100.0 = 1500.0 MHz base frequency
> cpu2: MSR_IA32_POWER_CTL: 0x0024005d (C1E auto-promotion: DISabled)
> cpu2: MSR_TURBO_RATIO_LIMIT: 0x2323232323232627
> 35 * 100.0 = 3500.0 MHz max turbo 8 active cores
> 35 * 100.0 = 3500.0 MHz max turbo 7 active cores
> 35 * 100.0 = 3500.0 MHz max turbo 6 active cores
> 35 * 100.0 = 3500.0 MHz max turbo 5 active cores
> 35 * 100.0 = 3500.0 MHz max turbo 4 active cores
> 35 * 100.0 = 3500.0 MHz max turbo 3 active cores
> 38 * 100.0 = 3800.0 MHz max turbo 2 active cores
> 39 * 100.0 = 3900.0 MHz max turbo 1 active cores
> cpu2: MSR_CONFIG_TDP_NOMINAL: 0x0000000d (base_ratio=13)
> cpu2: MSR_CONFIG_TDP_LEVEL_1: 0x000a0060 (PKG_MIN_PWR_LVL1=0
> PKG_MAX_PWR_LVL1=0 LVL1_RATIO=10 PKG_TDP_LVL1=96)
> cpu2: MSR_CONFIG_TDP_LEVEL_2: 0x000f00c8 (PKG_MIN_PWR_LVL2=0
> PKG_MAX_PWR_LVL2=0 LVL2_RATIO=15 PKG_TDP_LVL2=200)
> cpu2: MSR_CONFIG_TDP_CONTROL: 0x00000000 ( lock=0)
> cpu2: MSR_TURBO_ACTIVATION_RATIO: 0x0000000c (MAX_NON_TURBO_RATIO=12
> lock=0)
> cpu2: MSR_PKG_CST_CONFIG_CONTROL: 0x74008008 (UNdemote-C1, demote-C1,
> locked, pkg-cstate-limit=8 (unlimited))
> current_driver: intel_idle
> current_governor: menu
> current_governor_ro: menu
> cpu2: POLL: CPUIDLE CORE POLL IDLE
> cpu2: C1: MWAIT 0x00
> cpu2: C1E: MWAIT 0x01
> cpu2: C6: MWAIT 0x20
> cpu2: C7s: MWAIT 0x33
> cpu2: C8: MWAIT 0x40
> cpu2: C9: MWAIT 0x50
> cpu2: C10: MWAIT 0x60
> cpu2: cpufreq driver: intel_cpufreq
> cpu2: cpufreq governor: schedutil
> cpufreq intel_pstate no_turbo: 0
> cpu2: MSR_MISC_FEATURE_CONTROL: 0x00000000 (L2-Prefetch
> L2-Prefetch-pair L1-Prefetch L1-IP-Prefetch)
> cpu0: MSR_PM_ENABLE: 0x00000001 (HWP)
> cpu0: MSR_HWP_CAPABILITIES: 0x010e0d27 (high 39 guar 13 eff 14 low 1)
> cpu0: MSR_HWP_REQUEST: 0x80002727 (min 39 max 39 des 0 epp 0x80
> window
> 0x0 pkg 0x0)
> cpu0: MSR_HWP_REQUEST_PKG: 0x8000ff01 (min 1 max 255 des 0 epp 0x80
> window 0x0)
> cpu0: MSR_HWP_STATUS: 0x00000000 (No-Guaranteed_Perf_Change, No-
> Excursion_Min)
> cpu0: MSR_IA32_ENERGY_PERF_BIAS: 0x00000006 (balanced)
> cpu0: MSR_RAPL_POWER_UNIT: 0x000a0e03 (0.125000 Watts, 0.000061
> Joules, 0.000977 sec.)
> cpu0: MSR_PKG_POWER_INFO: 0x00000078 (15 W TDP, RAPL 0 - 0 W,
> 0.000000 sec.)
> cpu0: MSR_PKG_POWER_LIMIT: 0x5a8118009d80c8 (UNlocked)
> cpu0: PKG Limit #1: ENabled (25.000000 Watts, 24.000000 sec, clamp
> ENabled)
> cpu0: PKG Limit #2: ENabled (35.000000 Watts, 10.000000* sec, clamp
> DISabled)
> cpu0: MSR_DRAM_POWER_LIMIT: 0x5400de00000000 (UNlocked)
> cpu0: DRAM Limit: DISabled (0.000000 Watts, 0.000977 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: 0x05640000 (100 C)
> cpu0: MSR_IA32_PACKAGE_THERM_STATUS: 0x88290800 (59 C)
> cpu0: MSR_IA32_PACKAGE_THERM_INTERRUPT: 0x00000003 (100 C, 100 C)
> cpu2: MSR_PKGC3_IRTL: 0x00000000 (NOTvalid, 0 ns)
> cpu2: MSR_PKGC6_IRTL: 0x00000000 (NOTvalid, 0 ns)
> cpu2: MSR_PKGC7_IRTL: 0x00000000 (NOTvalid, 0 ns)
> cpu2: MSR_PKGC8_IRTL: 0x00000000 (NOTvalid, 0 ns)
> cpu2: MSR_PKGC9_IRTL: 0x00000000 (NOTvalid, 0 ns)
> cpu2: MSR_PKGC10_IRTL: 0x00000000 (NOTvalid, 0 ns)
> 10.003466 sec
> Core CPU Avg_MHz Busy% Bzy_MHz TSC_MHz IRQ SMI POLL C1 C1E C6 C7s C8
> C9 C10 POLL% C1% C1E% C6% C7s% C8% C9% C10% CPU%c1 CPU%c6 CPU%c7
> CoreTmp PkgTmp GFX%rc6 GFXMHz Totl%C0 Any%C0 GFX%C0 CPUGFX% Pkg%pc2
> Pkg%pc3 Pkg%pc6 Pkg%pc7 Pkg%pc8 Pkg%pc9 Pk%pc10 CPU%LPI SYS%LPI
> PkgWatt CorWatt GFXWatt RAMWatt PKG_% RAM_%

This is really hard to read.
can you please attach the two turbostat output as attachments?

thanks,
rui
> - - 219 8.59 2549 1498 48489 160 71 1256 11389 21414 5 31317 489 8252
> 0.00 0.10 1.61 17.26 0.01 52.02 0.53 19.27 16.07 26.24 49.10 56 56
> 96.64 300 68.29 48.58 3.08 2.10 30.36 0.04 0.00 0.00 0.00 0.00 0.00
> 0.00 0.00 7.38 4.91 0.07 0.00 0.00 0.00
> 0 0 189 5.83 3239 1498 6131 20 26 222 1922 2648 0 4232 0 298 0.00
> 0.20
> 1.97 16.85 0.00 69.76 0.00 4.51 20.30 20.57 53.30 56 56 96.64 300
> 68.29 48.58 3.08 2.10 30.36 0.04 0.00 0.00 0.00 0.00 0.00 0.00 0.00
> 7.38 4.91 0.07 0.00 0.00 0.00
> 0 4 397 12.02 3307 1498 4248 20 5 173 1252 1552 0 3266 2 1367 0.00
> 0.08 1.22 10.13 0.00 46.47 0.01 28.39 14.11
> 1 1 302 8.53 3545 1498 6108 20 11 155 1215 3588 0 4462 0 2 0.00 0.11
> 1.90 28.91 0.00 59.04 0.00 0.08 14.13 31.04 46.31 55
> 1 5 149 6.29 2378 1498 3953 20 8 144 1391 1710 0 3239 9 1304 0.00
> 0.06
> 1.48 10.45 0.00 49.50 0.23 31.45 16.37
> 2 2 159 7.86 2022 1498 3688 20 5 111 1088 1450 0 3122 1 1191 0.00
> 0.14
> 0.95 9.49 0.00 49.73 0.07 31.64 13.61 19.24 59.29 54
> 2 6 175 7.44 2355 1498 6107 20 4 137 1726 2424 0 3863 4 651 0.00 0.06
> 1.90 15.83 0.00 56.39 0.04 18.00 14.03
> 3 3 213 11.84 1797 1498 13814 20 7 170 1431 6125 2 5634 464 2422 0.00
> 0.09 1.89 34.67 0.01 31.54 3.82 16.28 16.54 34.11 37.51 52
> 3 7 167 8.91 1871 1498 4440 20 5 144 1364 1917 3 3499 9 1017 0.00
> 0.07
> 1.55 11.78 0.03 53.73 0.07 23.83 19.47
> 
> without (3.9-rc2):
> 
> turbostat version 20.03.20 - Len Brown <lenb@kernel.org>
> CPUID(0): GenuineIntel 0x1b CPUID levels; 0x80000008 xlevels;
> family:model:stepping 0x6:7e:5 (6:126:5)
> CPUID(1): SSE3 MONITOR - EIST TM2 TSC MSR ACPI-TM HT TM
> CPUID(6): APERF, TURBO, DTS, PTM, HWP, No-HWPnotify, HWPwindow,
> HWPepp, HWPpkg, EPB
> cpu1: MSR_IA32_MISC_ENABLE: 0x00850089 (TCC EIST MWAIT PREFETCH
> TURBO)
> CPUID(7): SGX
> cpu1: MSR_IA32_FEATURE_CONTROL: 0x00020005 (Locked )
> CPUID(0x15): eax_crystal: 2 ebx_tsc: 78 ecx_crystal_hz: 38400000
> TSC: 1497 MHz (38400000 Hz * 78 / 2 / 1000000)
> CPUID(0x16): base_mhz: 1500 max_mhz: 3900 bus_mhz: 100
> cpu1: MSR_MISC_PWR_MGMT: 0x00401c40 (ENable-EIST_Coordination
> DISable-EPB DISable-OOB)
> RAPL: 17476 sec. Joule Counter Range, at 15 Watts
> cpu1: MSR_PLATFORM_INFO: 0x4043cf1810f00
> 4 * 100.0 = 400.0 MHz max efficiency frequency
> 15 * 100.0 = 1500.0 MHz base frequency
> cpu1: MSR_IA32_POWER_CTL: 0x0024005f (C1E auto-promotion: ENabled)
> cpu1: MSR_TURBO_RATIO_LIMIT: 0x2323232323232627
> 35 * 100.0 = 3500.0 MHz max turbo 8 active cores
> 35 * 100.0 = 3500.0 MHz max turbo 7 active cores
> 35 * 100.0 = 3500.0 MHz max turbo 6 active cores
> 35 * 100.0 = 3500.0 MHz max turbo 5 active cores
> 35 * 100.0 = 3500.0 MHz max turbo 4 active cores
> 35 * 100.0 = 3500.0 MHz max turbo 3 active cores
> 38 * 100.0 = 3800.0 MHz max turbo 2 active cores
> 39 * 100.0 = 3900.0 MHz max turbo 1 active cores
> cpu1: MSR_CONFIG_TDP_NOMINAL: 0x0000000d (base_ratio=13)
> cpu1: MSR_CONFIG_TDP_LEVEL_1: 0x000a0060 (PKG_MIN_PWR_LVL1=0
> PKG_MAX_PWR_LVL1=0 LVL1_RATIO=10 PKG_TDP_LVL1=96)
> cpu1: MSR_CONFIG_TDP_LEVEL_2: 0x000f00c8 (PKG_MIN_PWR_LVL2=0
> PKG_MAX_PWR_LVL2=0 LVL2_RATIO=15 PKG_TDP_LVL2=200)
> cpu1: MSR_CONFIG_TDP_CONTROL: 0x00000000 ( lock=0)
> cpu1: MSR_TURBO_ACTIVATION_RATIO: 0x0000000c (MAX_NON_TURBO_RATIO=12
> lock=0)
> cpu1: MSR_PKG_CST_CONFIG_CONTROL: 0x74008008 (UNdemote-C1, demote-C1,
> locked, pkg-cstate-limit=8 (unlimited))
> current_driver: intel_idle
> current_governor: menu
> current_governor_ro: menu
> cpu1: POLL: CPUIDLE CORE POLL IDLE
> cpu1: C1_ACPI: ACPI FFH MWAIT 0x0
> cpu1: C2_ACPI: ACPI FFH MWAIT 0x31
> cpu1: C3_ACPI: ACPI FFH MWAIT 0x60
> cpu1: cpufreq driver: intel_cpufreq
> cpu1: cpufreq governor: schedutil
> cpufreq intel_pstate no_turbo: 0
> cpu1: MSR_MISC_FEATURE_CONTROL: 0x00000000 (L2-Prefetch
> L2-Prefetch-pair L1-Prefetch L1-IP-Prefetch)
> cpu0: MSR_PM_ENABLE: 0x00000001 (HWP)
> cpu0: MSR_HWP_CAPABILITIES: 0x010e0d27 (high 39 guar 13 eff 14 low 1)
> cpu0: MSR_HWP_REQUEST: 0x80002727 (min 39 max 39 des 0 epp 0x80
> window
> 0x0 pkg 0x0)
> cpu0: MSR_HWP_REQUEST_PKG: 0x8000ff01 (min 1 max 255 des 0 epp 0x80
> window 0x0)
> cpu0: MSR_HWP_STATUS: 0x00000000 (No-Guaranteed_Perf_Change, No-
> Excursion_Min)
> cpu0: MSR_IA32_ENERGY_PERF_BIAS: 0x00000006 (balanced)
> cpu0: MSR_RAPL_POWER_UNIT: 0x000a0e03 (0.125000 Watts, 0.000061
> Joules, 0.000977 sec.)
> cpu0: MSR_PKG_POWER_INFO: 0x00000078 (15 W TDP, RAPL 0 - 0 W,
> 0.000000 sec.)
> cpu0: MSR_PKG_POWER_LIMIT: 0x42817000dd8170 (UNlocked)
> cpu0: PKG Limit #1: ENabled (46.000000 Watts, 28.000000 sec, clamp
> ENabled)
> cpu0: PKG Limit #2: ENabled (46.000000 Watts, 0.002441* sec, clamp
> DISabled)
> cpu0: MSR_DRAM_POWER_LIMIT: 0x5400de00000000 (UNlocked)
> cpu0: DRAM Limit: DISabled (0.000000 Watts, 0.000977 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: 0x00640000 (100 C)
> cpu0: MSR_IA32_PACKAGE_THERM_STATUS: 0x881d0800 (71 C)
> cpu0: MSR_IA32_PACKAGE_THERM_INTERRUPT: 0x00000003 (100 C, 100 C)
> cpu1: MSR_PKGC3_IRTL: 0x00000000 (NOTvalid, 0 ns)
> cpu1: MSR_PKGC6_IRTL: 0x00000000 (NOTvalid, 0 ns)
> cpu1: MSR_PKGC7_IRTL: 0x00000000 (NOTvalid, 0 ns)
> cpu1: MSR_PKGC8_IRTL: 0x00000000 (NOTvalid, 0 ns)
> cpu1: MSR_PKGC9_IRTL: 0x00000000 (NOTvalid, 0 ns)
> cpu1: MSR_PKGC10_IRTL: 0x00000000 (NOTvalid, 0 ns)
> 10.002424 sec
> Core CPU Avg_MHz Busy% Bzy_MHz TSC_MHz IRQ SMI POLL C1_ACPI C2_ACPI
> C3_ACPI POLL% C1_ACPI% C2_ACPI% C3_ACPI% CPU%c1 CPU%c6 CPU%c7 CoreTmp
> PkgTmp GFX%rc6 GFXMHz Totl%C0 Any%C0 GFX%C0 CPUGFX% Pkg%pc2 Pkg%pc3
> Pkg%pc6 Pkg%pc7 Pkg%pc8 Pkg%pc9 Pk%pc10 CPU%LPI SYS%LPI PkgWatt
> CorWatt GFXWatt RAMWatt PKG_% RAM_%
> - - 204 9.81 2083 1497 50389 176 820 25733 20628 14751 0.01 10.71
> 36.19 42.84 29.48 0.00 60.71 58 58 97.96 300 73.65 52.84 1.861.41
> 16.96 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 6.08 3.79 0.03 0.00
> 0.00
> 0.00
> 0 0 218 7.90 2760 1497 6824 22 4 3882 3146 864 0.00 12.68 53.86 24.76
> 26.32 0.00 65.77 58 58 97.96 300 73.65 52.84 1.861.41 16.96 0.00 0.00
> 0.00 0.00 0.00 0.00 0.00 0.00 6.08 3.79 0.03 0.00 0.00 0.00
> 0 4 144 6.91 2084 1497 4409 22 7 2410 2078 1608 0.00 7.55 32.26 52.88
> 27.32
> 1 1 154 8.09 1903 1497 4783 22 3 2528 2178 1801 0.00 7.54 34.66 49.51
> 42.41 0.00 49.50 57
> 1 5 290 14.49 2000 1497 14750 22 755 5964 4261 4558 0.04 22.47 27.57
> 35.05 36.01
> 2 2 209 11.35 1840 1497 4663 22 1 2771 2132 1467 0.00 8.39 31.37
> 48.69
> 28.70 0.00 59.96 55
> 2 6 232 13.35 1738 1497 5625 22 40 3313 2140 1338 0.00 10.36 33.13
> 42.87 26.70
> 3 3 221 9.01 2451 1497 4944 22 7 2627 2536 1447 0.00 9.32 41.41 39.55
> 23.38 0.00 67.61 54
> 3 7 167 7.39 2266 1497 4391 22 3 2238 2157 1668 0.00 7.39 35.25 49.42
> 25.00
> 
> 
> > 
> > Artem.
> > 
> 
> Guilhem Lettron
Guilhem Lettron Aug. 26, 2020, 2:04 p.m. UTC | #13
On Wed, 26 Aug 2020 at 15:41, Zhang Rui <rui.zhang@intel.com> wrote:
>
>
> This is really hard to read.
> can you please attach the two turbostat output as attachments?

of course :)

Guilhem Lettron
turbostat version 20.03.20 - Len Brown <lenb@kernel.org>
CPUID(0): GenuineIntel 0x1b CPUID levels; 0x80000008 xlevels;
family:model:stepping 0x6:7e:5 (6:126:5)
CPUID(1): SSE3 MONITOR - EIST TM2 TSC MSR ACPI-TM HT TM
CPUID(6): APERF, TURBO, DTS, PTM, HWP, No-HWPnotify, HWPwindow,
HWPepp, HWPpkg, EPB
cpu2: MSR_IA32_MISC_ENABLE: 0x00850089 (TCC EIST MWAIT PREFETCH TURBO)
CPUID(7): SGX
cpu2: MSR_IA32_FEATURE_CONTROL: 0x00020005 (Locked )
CPUID(0x15): eax_crystal: 2 ebx_tsc: 78 ecx_crystal_hz: 38400000
TSC: 1497 MHz (38400000 Hz * 78 / 2 / 1000000)
CPUID(0x16): base_mhz: 1500 max_mhz: 3900 bus_mhz: 100
cpu2: MSR_MISC_PWR_MGMT: 0x00401c40 (ENable-EIST_Coordination
DISable-EPB DISable-OOB)
RAPL: 17476 sec. Joule Counter Range, at 15 Watts
cpu2: MSR_PLATFORM_INFO: 0x4043cf1810f00
4 * 100.0 = 400.0 MHz max efficiency frequency
15 * 100.0 = 1500.0 MHz base frequency
cpu2: MSR_IA32_POWER_CTL: 0x0024005d (C1E auto-promotion: DISabled)
cpu2: MSR_TURBO_RATIO_LIMIT: 0x2323232323232627
35 * 100.0 = 3500.0 MHz max turbo 8 active cores
35 * 100.0 = 3500.0 MHz max turbo 7 active cores
35 * 100.0 = 3500.0 MHz max turbo 6 active cores
35 * 100.0 = 3500.0 MHz max turbo 5 active cores
35 * 100.0 = 3500.0 MHz max turbo 4 active cores
35 * 100.0 = 3500.0 MHz max turbo 3 active cores
38 * 100.0 = 3800.0 MHz max turbo 2 active cores
39 * 100.0 = 3900.0 MHz max turbo 1 active cores
cpu2: MSR_CONFIG_TDP_NOMINAL: 0x0000000d (base_ratio=13)
cpu2: MSR_CONFIG_TDP_LEVEL_1: 0x000a0060 (PKG_MIN_PWR_LVL1=0
PKG_MAX_PWR_LVL1=0 LVL1_RATIO=10 PKG_TDP_LVL1=96)
cpu2: MSR_CONFIG_TDP_LEVEL_2: 0x000f00c8 (PKG_MIN_PWR_LVL2=0
PKG_MAX_PWR_LVL2=0 LVL2_RATIO=15 PKG_TDP_LVL2=200)
cpu2: MSR_CONFIG_TDP_CONTROL: 0x00000000 ( lock=0)
cpu2: MSR_TURBO_ACTIVATION_RATIO: 0x0000000c (MAX_NON_TURBO_RATIO=12 lock=0)
cpu2: MSR_PKG_CST_CONFIG_CONTROL: 0x74008008 (UNdemote-C1, demote-C1,
locked, pkg-cstate-limit=8 (unlimited))
current_driver: intel_idle
current_governor: menu
current_governor_ro: menu
cpu2: POLL: CPUIDLE CORE POLL IDLE
cpu2: C1: MWAIT 0x00
cpu2: C1E: MWAIT 0x01
cpu2: C6: MWAIT 0x20
cpu2: C7s: MWAIT 0x33
cpu2: C8: MWAIT 0x40
cpu2: C9: MWAIT 0x50
cpu2: C10: MWAIT 0x60
cpu2: cpufreq driver: intel_cpufreq
cpu2: cpufreq governor: schedutil
cpufreq intel_pstate no_turbo: 0
cpu2: MSR_MISC_FEATURE_CONTROL: 0x00000000 (L2-Prefetch
L2-Prefetch-pair L1-Prefetch L1-IP-Prefetch)
cpu0: MSR_PM_ENABLE: 0x00000001 (HWP)
cpu0: MSR_HWP_CAPABILITIES: 0x010e0d27 (high 39 guar 13 eff 14 low 1)
cpu0: MSR_HWP_REQUEST: 0x80002727 (min 39 max 39 des 0 epp 0x80 window
0x0 pkg 0x0)
cpu0: MSR_HWP_REQUEST_PKG: 0x8000ff01 (min 1 max 255 des 0 epp 0x80 window 0x0)
cpu0: MSR_HWP_STATUS: 0x00000000 (No-Guaranteed_Perf_Change, No-Excursion_Min)
cpu0: MSR_IA32_ENERGY_PERF_BIAS: 0x00000006 (balanced)
cpu0: MSR_RAPL_POWER_UNIT: 0x000a0e03 (0.125000 Watts, 0.000061
Joules, 0.000977 sec.)
cpu0: MSR_PKG_POWER_INFO: 0x00000078 (15 W TDP, RAPL 0 - 0 W, 0.000000 sec.)
cpu0: MSR_PKG_POWER_LIMIT: 0x5a8118009d80c8 (UNlocked)
cpu0: PKG Limit #1: ENabled (25.000000 Watts, 24.000000 sec, clamp ENabled)
cpu0: PKG Limit #2: ENabled (35.000000 Watts, 10.000000* sec, clamp DISabled)
cpu0: MSR_DRAM_POWER_LIMIT: 0x5400de00000000 (UNlocked)
cpu0: DRAM Limit: DISabled (0.000000 Watts, 0.000977 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: 0x05640000 (100 C)
cpu0: MSR_IA32_PACKAGE_THERM_STATUS: 0x88290800 (59 C)
cpu0: MSR_IA32_PACKAGE_THERM_INTERRUPT: 0x00000003 (100 C, 100 C)
cpu2: MSR_PKGC3_IRTL: 0x00000000 (NOTvalid, 0 ns)
cpu2: MSR_PKGC6_IRTL: 0x00000000 (NOTvalid, 0 ns)
cpu2: MSR_PKGC7_IRTL: 0x00000000 (NOTvalid, 0 ns)
cpu2: MSR_PKGC8_IRTL: 0x00000000 (NOTvalid, 0 ns)
cpu2: MSR_PKGC9_IRTL: 0x00000000 (NOTvalid, 0 ns)
cpu2: MSR_PKGC10_IRTL: 0x00000000 (NOTvalid, 0 ns)
10.003466 sec
Core 	CPU 	Avg_MHz 	Busy% 	Bzy_MHz 	TSC_MHz 	IRQ 	SMI 	POLL 	C1 	C1E 	C6 	C7s 	C8 	C9 	C10 	POLL% 	C1% 	C1E% 	C6% 	C7s% 	C8% 	C9% 	C10% 	CPU%c1 	CPU%c6 	CPU%c7 	CoreTmp 	PkgTmp 	GFX%rc6 	GFXMHz 	Totl%C0 	Any%C0 	GFX%C0 	CPUGFX% 	Pkg%pc2
Pkg%pc3 	Pkg%pc6 	Pkg%pc7 	Pkg%pc8 	Pkg%pc9 	Pk%pc10 	CPU%LPI 	SYS%LPI 	PkgWatt 	CorWatt 	GFXWatt 	RAMWatt 	PKG_% 	RAM_%
- 	- 	219 	8.59 	2549 	1498 	48489 	160 	71 	1256 	11389 	21414 	5 	31317 	489 	8252 	0.00 	0.10 	1.61 	17.26 	0.01 	52.02 	0.53 	19.27 	16.07 	26.24 	49.10 	56 	56 	96.64 	300 	68.29 	48.58 	3.08 	2.10 	30.36 	0.04 	0.00 	0.00 	0.00 	0.00 	0.00 	0.00 	0.00 	7.38 	4.91 	0.07 	0.00 	0.00 	0.00
0 	0 	189 	5.83 	3239 	1498 	6131 	20 	26 	222 	1922 	2648 	0 	4232 	0 	298 	0.00 	0.20 	1.97 	16.85 	0.00 	69.76 	0.00 	4.51 	20.30 	20.57 	53.30 	56 	56 	96.64 	300 	68.29 	48.58 	3.08 	2.10 	30.36 	0.04 	0.00 	0.00 	0.00 	0.00 	0.00 	0.00 	0.00 	7.38 	4.91 	0.07 	0.00 	0.00 	0.00
0 	4 	397 	12.02 	3307 	1498 	4248 	20 	5 	173 	1252 	1552 	0 	3266 	2 	1367 	0.00 	0.08 	1.22 	10.13 	0.00 	46.47 	0.01 	28.39 	14.11
1 	1 	302 	8.53 	3545 	1498 	6108 	20 	11 	155 	1215 	3588 	0 	4462 	0 	2 	0.00 	0.11 	1.90 	28.91 	0.00 	59.04 	0.00 	0.08 	14.13 	31.04 	46.31 	55
1 	5 	149 	6.29 	2378 	1498 	3953 	20 	8 	144 	1391 	1710 	0 	3239 	9 	1304 	0.00 	0.06 	1.48 	10.45 	0.00 	49.50 	0.23 	31.45 	16.37
2 	2 	159 	7.86 	2022 	1498 	3688 	20 	5 	111 	1088 	1450 	0 	3122 	1 	1191 	0.00 	0.14 	0.95 	9.49 	0.00 	49.73 	0.07 	31.64 	13.61 	19.24 	59.29 	54
2 	6 	175 	7.44 	2355 	1498 	6107 	20 	4 	137 	1726 	2424 	0 	3863 	4 	651 	0.00 	0.06 	1.90 	15.83 	0.00 	56.39 	0.04 	18.00 	14.03
3 	3 	213 	11.84 	1797 	1498 	13814 	20 	7 	170 	1431 	6125 	2 	5634 	464 	2422 	0.00 	0.09 	1.89 	34.67 	0.01 	31.54 	3.82 	16.28 	16.54 	34.11 	37.51 	52
3 	7 	167 	8.91 	1871 	1498 	4440 	20 	5 	144 	1364 	1917 	3 	3499 	9 	1017 	0.00 	0.07 	1.55 	11.78 	0.03 	53.73 	0.07 	23.83 	19.47
turbostat version 20.03.20 - Len Brown <lenb@kernel.org>
CPUID(0): GenuineIntel 0x1b CPUID levels; 0x80000008 xlevels; family:model:stepping 0x6:7e:5 (6:126:5)
CPUID(1): SSE3 MONITOR - EIST TM2 TSC MSR ACPI-TM HT TM
CPUID(6): APERF, TURBO, DTS, PTM, HWP, No-HWPnotify, HWPwindow, HWPepp, HWPpkg, EPB
cpu1: MSR_IA32_MISC_ENABLE: 0x00850089 (TCC EIST MWAIT PREFETCH TURBO)
CPUID(7): SGX
cpu1: MSR_IA32_FEATURE_CONTROL: 0x00020005 (Locked )
CPUID(0x15): eax_crystal: 2 ebx_tsc: 78 ecx_crystal_hz: 38400000
TSC: 1497 MHz (38400000 Hz * 78 / 2 / 1000000)
CPUID(0x16): base_mhz: 1500 max_mhz: 3900 bus_mhz: 100
cpu1: MSR_MISC_PWR_MGMT: 0x00401c40 (ENable-EIST_Coordination DISable-EPB DISable-OOB)
RAPL: 17476 sec. Joule Counter Range, at 15 Watts
cpu1: MSR_PLATFORM_INFO: 0x4043cf1810f00
4 * 100.0 = 400.0 MHz max efficiency frequency
15 * 100.0 = 1500.0 MHz base frequency
cpu1: MSR_IA32_POWER_CTL: 0x0024005f (C1E auto-promotion: ENabled)
cpu1: MSR_TURBO_RATIO_LIMIT: 0x2323232323232627
35 * 100.0 = 3500.0 MHz max turbo 8 active cores
35 * 100.0 = 3500.0 MHz max turbo 7 active cores
35 * 100.0 = 3500.0 MHz max turbo 6 active cores
35 * 100.0 = 3500.0 MHz max turbo 5 active cores
35 * 100.0 = 3500.0 MHz max turbo 4 active cores
35 * 100.0 = 3500.0 MHz max turbo 3 active cores
38 * 100.0 = 3800.0 MHz max turbo 2 active cores
39 * 100.0 = 3900.0 MHz max turbo 1 active cores
cpu1: MSR_CONFIG_TDP_NOMINAL: 0x0000000d (base_ratio=13)
cpu1: MSR_CONFIG_TDP_LEVEL_1: 0x000a0060 (PKG_MIN_PWR_LVL1=0 PKG_MAX_PWR_LVL1=0 LVL1_RATIO=10 PKG_TDP_LVL1=96)
cpu1: MSR_CONFIG_TDP_LEVEL_2: 0x000f00c8 (PKG_MIN_PWR_LVL2=0 PKG_MAX_PWR_LVL2=0 LVL2_RATIO=15 PKG_TDP_LVL2=200)
cpu1: MSR_CONFIG_TDP_CONTROL: 0x00000000 ( lock=0)
cpu1: MSR_TURBO_ACTIVATION_RATIO: 0x0000000c (MAX_NON_TURBO_RATIO=12 lock=0)
cpu1: MSR_PKG_CST_CONFIG_CONTROL: 0x74008008 (UNdemote-C1, demote-C1, locked, pkg-cstate-limit=8 (unlimited))
current_driver: intel_idle
current_governor: menu
current_governor_ro: menu
cpu1: POLL: CPUIDLE CORE POLL IDLE
cpu1: C1_ACPI: ACPI FFH MWAIT 0x0
cpu1: C2_ACPI: ACPI FFH MWAIT 0x31
cpu1: C3_ACPI: ACPI FFH MWAIT 0x60
cpu1: cpufreq driver: intel_cpufreq
cpu1: cpufreq governor: schedutil
cpufreq intel_pstate no_turbo: 0
cpu1: MSR_MISC_FEATURE_CONTROL: 0x00000000 (L2-Prefetch L2-Prefetch-pair L1-Prefetch L1-IP-Prefetch)
cpu0: MSR_PM_ENABLE: 0x00000001 (HWP)
cpu0: MSR_HWP_CAPABILITIES: 0x010e0d27 (high 39 guar 13 eff 14 low 1)
cpu0: MSR_HWP_REQUEST: 0x80002727 (min 39 max 39 des 0 epp 0x80 window 0x0 pkg 0x0)
cpu0: MSR_HWP_REQUEST_PKG: 0x8000ff01 (min 1 max 255 des 0 epp 0x80 window 0x0)
cpu0: MSR_HWP_STATUS: 0x00000000 (No-Guaranteed_Perf_Change, No-Excursion_Min)
cpu0: MSR_IA32_ENERGY_PERF_BIAS: 0x00000006 (balanced)
cpu0: MSR_RAPL_POWER_UNIT: 0x000a0e03 (0.125000 Watts, 0.000061 Joules, 0.000977 sec.)
cpu0: MSR_PKG_POWER_INFO: 0x00000078 (15 W TDP, RAPL 0 - 0 W, 0.000000 sec.)
cpu0: MSR_PKG_POWER_LIMIT: 0x42817000dd8170 (UNlocked)
cpu0: PKG Limit #1: ENabled (46.000000 Watts, 28.000000 sec, clamp ENabled)
cpu0: PKG Limit #2: ENabled (46.000000 Watts, 0.002441* sec, clamp DISabled)
cpu0: MSR_DRAM_POWER_LIMIT: 0x5400de00000000 (UNlocked)
cpu0: DRAM Limit: DISabled (0.000000 Watts, 0.000977 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: 0x00640000 (100 C)
cpu0: MSR_IA32_PACKAGE_THERM_STATUS: 0x881d0800 (71 C)
cpu0: MSR_IA32_PACKAGE_THERM_INTERRUPT: 0x00000003 (100 C, 100 C)
cpu1: MSR_PKGC3_IRTL: 0x00000000 (NOTvalid, 0 ns)
cpu1: MSR_PKGC6_IRTL: 0x00000000 (NOTvalid, 0 ns)
cpu1: MSR_PKGC7_IRTL: 0x00000000 (NOTvalid, 0 ns)
cpu1: MSR_PKGC8_IRTL: 0x00000000 (NOTvalid, 0 ns)
cpu1: MSR_PKGC9_IRTL: 0x00000000 (NOTvalid, 0 ns)
cpu1: MSR_PKGC10_IRTL: 0x00000000 (NOTvalid, 0 ns)
10.002424 sec
Core	CPU	Avg_MHz	Busy%	Bzy_MHz	TSC_MHz	IRQ	SMI	POLL	C1_ACPI	C2_ACPI	C3_ACPI	POLL%	C1_ACPI%	C2_ACPI%	C3_ACPI%	CPU%c1	CPU%c6	CPU%c7	CoreTmp	PkgTmp	GFX%rc6	GFXMHz	Totl%C0	Any%C0	GFX%C0	CPUGFX%	Pkg%pc2	Pkg%pc3	Pkg%pc6	Pkg%pc7	Pkg%pc8	Pkg%pc9	Pk%pc10	CPU%LPI	SYS%LPI	PkgWatt	CorWatt	GFXWatt	RAMWatt	PKG_%	RAM_%
-	-	204	9.81	2083	1497	50389	176	820	25733	20628	14751	0.01	10.71	36.19	42.84	29.48	0.00	60.71	58	58	97.96	300	73.65	52.84	1.861.41	16.96	0.00	0.00	0.00	0.00	0.00	0.00	0.00	0.00	6.08	3.79	0.03	0.00	0.00	0.00
0	0	218	7.90	2760	1497	6824	22	4	3882	3146	864	0.00	12.68	53.86	24.76	26.32	0.00	65.77	58	58	97.96	300	73.65	52.84	1.861.41	16.96	0.00	0.00	0.00	0.00	0.00	0.00	0.00	0.00	6.08	3.79	0.03	0.00	0.00	0.00
0	4	144	6.91	2084	1497	4409	22	7	2410	2078	1608	0.00	7.55	32.26	52.88	27.32
1	1	154	8.09	1903	1497	4783	22	3	2528	2178	1801	0.00	7.54	34.66	49.51	42.41	0.00	49.50	57
1	5	290	14.49	2000	1497	14750	22	755	5964	4261	4558	0.04	22.47	27.57	35.05	36.01
2	2	209	11.35	1840	1497	4663	22	1	2771	2132	1467	0.00	8.39	31.37	48.69	28.70	0.00	59.96	55
2	6	232	13.35	1738	1497	5625	22	40	3313	2140	1338	0.00	10.36	33.13	42.87	26.70
3	3	221	9.01	2451	1497	4944	22	7	2627	2536	1447	0.00	9.32	41.41	39.55	23.38	0.00	67.61	54
3	7	167	7.39	2266	1497	4391	22	3	2238	2157	1668	0.00	7.39	35.25	49.42	25.00
Rafael J. Wysocki Aug. 26, 2020, 4:02 p.m. UTC | #14
On Wed, Aug 26, 2020 at 4:04 PM Guilhem Lettron <guilhem@barpilot.io> wrote:
>
> On Wed, 26 Aug 2020 at 15:41, Zhang Rui <rui.zhang@intel.com> wrote:
> >
> >
> > This is really hard to read.
> > can you please attach the two turbostat output as attachments?
>
> of course :)

Thanks!

A couple of things happen here AFAICS.

First, your processor seems to be unable to enter package C-states
below PC3, so probably there is a device (most likely a PCI one)
preventing it from doing that in the system.  If all goes well, it
should be able to get to at least PC8 without suspending the whole
system.  That needs to be dealt with in the first place before we can
draw meaningful conclusions regarding which set of C-states to expose
and whether or not the one exposed via ACPI is sufficient.

To that end, I would try to upgrade the graphics firmware and see if
you can get some nonzero PC8 residency then.

Second, ACPI exposes C1, C7s and C10 only and so you don't get any
CPU-C6 residency without the patch, but instead you get more CPU-C7
residency and more CPU-C1 residency.  It is hard to say which is
better in principle, but if you look at what is asked for by the
governor, it turns out that deep C-states (C8-C10) are requested
around 54% of the time with the patch, whereas without it the ACPI_C3
state (corresponding to C10) is requested approximately 24% of the
time, which is much less often.  That appears to translate to the
difference in PC2 residency (~30% with the patch vs ~17% without it).

Note, however, that (with the patch) C10 itself is asked for around
11% of the time which in turn is much less than the ~24% for the
corresponding ACPI_C3 (without the patch).

Overall, it looks like exposing C8 is beneficial from the energy usage
perspective, because (in the future, when the "blocking" device is
taken care of and the system can enter PC8 and deeper package
C-states) it may allow PC8 to be entered more often in principle, even
though it may reduce the amount of time spent in PC10 too (PC10 may be
generally difficult to enter, though).  [Here I'm assuming that the
processor enters PC3 or PC2 instead of PC8 or deeper which cannot be
entered due to some resource dependency.]

OTOH exposing C1E doesn't seem to make much of a difference and
exposing C6 only causes it to be asked for instead of C7s, so exposing
the latter alone should be sufficient in theory.

So IMO the set of C-states exposed by ACPI looks almost enough, but
the jury is out until you can make the system be able to enter at
least PC8.

Cheers!
Artem Bityutskiy Aug. 26, 2020, 4:19 p.m. UTC | #15
Indeed, when I compare them:

acpi_idle (without the patch):

CPU%c1  CPU%c6  CPU%c7  CoreTmp PkgTmp  GFX%rc6 Pkg%pc2 Pkg%pc3 Pkg%pc6 Pkg%pc7 Pkg%pc8 Pkg%pc9 Pk%pc10 PkgWatt
29.48   0.00    60.71   58      58      97.96   16.96   0.00    0.00    0.00    0.00    0.00    0.00    6.08

intel_idle (with the patch):

CPU%c1  CPU%c6  CPU%c7  CoreTmp PkgTmp  GFX%rc6 Pkg%pc2 Pkg%pc3 Pkg%pc6 Pkg%pc7 Pkg%pc8 Pkg%pc9 Pk%pc10 PkgWatt
56      56      96.64   300     68.29   48.58   0.00    0.00    0.00    0.00    0.00    0.00    7.38    0.00

With intel_idle we reach PC10, without it we only go as deep as PC2 - huge difference.

I really wonder why the BIOS does not expose deeper C-states... And if
it does not, is this for a reason? And how windows works then?

May be there is a BIOS update that fixes this problem? May be Windows
user get it quickly because stuff like this is often well-integrated in
Windows? Would you please check if there is newer BIOS?

Artem.
Rafael J. Wysocki Aug. 26, 2020, 4:21 p.m. UTC | #16
On Wed, Aug 26, 2020 at 6:02 PM Rafael J. Wysocki <rafael@kernel.org> wrote:
>
> On Wed, Aug 26, 2020 at 4:04 PM Guilhem Lettron <guilhem@barpilot.io> wrote:
> >
> > On Wed, 26 Aug 2020 at 15:41, Zhang Rui <rui.zhang@intel.com> wrote:
> > >
> > >
> > > This is really hard to read.
> > > can you please attach the two turbostat output as attachments?
> >
> > of course :)
>
> Thanks!
>
> A couple of things happen here AFAICS.
>
> First, your processor seems to be unable to enter package C-states
> below PC3, so probably there is a device (most likely a PCI one)
> preventing it from doing that in the system.  If all goes well, it
> should be able to get to at least PC8 without suspending the whole
> system.  That needs to be dealt with in the first place before we can
> draw meaningful conclusions regarding which set of C-states to expose
> and whether or not the one exposed via ACPI is sufficient.
>
> To that end, I would try to upgrade the graphics firmware and see if
> you can get some nonzero PC8 residency then.
>
> Second, ACPI exposes C1, C7s and C10 only and so you don't get any
> CPU-C6 residency without the patch, but instead you get more CPU-C7
> residency and more CPU-C1 residency.  It is hard to say which is
> better in principle, but if you look at what is asked for by the
> governor, it turns out that deep C-states (C8-C10) are requested
> around 54% of the time with the patch, whereas without it the ACPI_C3
> state (corresponding to C10) is requested approximately 24% of the
> time, which is much less often.  That appears to translate to the
> difference in PC2 residency (~30% with the patch vs ~17% without it).
>
> Note, however, that (with the patch) C10 itself is asked for around
> 11% of the time which in turn is much less than the ~24% for the
> corresponding ACPI_C3 (without the patch).
>
> Overall, it looks like exposing C8 is beneficial from the energy usage
> perspective, because (in the future, when the "blocking" device is
> taken care of and the system can enter PC8 and deeper package
> C-states) it may allow PC8 to be entered more often in principle, even
> though it may reduce the amount of time spent in PC10 too (PC10 may be
> generally difficult to enter, though).  [Here I'm assuming that the
> processor enters PC3 or PC2 instead of PC8 or deeper which cannot be
> entered due to some resource dependency.]
>
> OTOH exposing C1E doesn't seem to make much of a difference and
> exposing C6 only causes it to be asked for instead of C7s, so exposing
> the latter alone should be sufficient in theory.

I need to correct myself here.

With the patch C7s is exposed with the target residency of C8 which is
why it is almost never selected by the governor and that's why C6 is
kind of "instead" of it.

So it looks like it might be beneficial to expose C8 (instead of C7s)
and C6 with the target residency significantly less than that of C8.

> So IMO the set of C-states exposed by ACPI looks almost enough, but
> the jury is out until you can make the system be able to enter at
> least PC8.
Artem Bityutskiy Aug. 26, 2020, 4:25 p.m. UTC | #17
On Wed, 2020-08-26 at 19:19 +0300, Artem Bityutskiy wrote:
> May be there is a BIOS update that fixes this problem? May be Windows
> user get it quickly because stuff like this is often well-integrated in
> Windows? Would you please check if there is newer BIOS?

Oh, wait a second. So ACPI_C3 is C6, the deepest C-state one can
request. Sorry, I missed this first. Scratch my questions about Windows
and newer BIOS.

So ACPI does expose the deepest C-state, but something prevents your
system from going into PC10.
Artem Bityutskiy Aug. 26, 2020, 4:28 p.m. UTC | #18
On Wed, 2020-08-26 at 19:25 +0300, Artem Bityutskiy wrote:
> C6

Ok, too long day, I meant C10 here...
Artem Bityutskiy Aug. 26, 2020, 4:39 p.m. UTC | #19
On Wed, 2020-08-26 at 18:02 +0200, Rafael J. Wysocki wrote:
> To that end, I would try to upgrade the graphics firmware and see if
> you can get some nonzero PC8 residency then.

I am curious, somehow that patch makes a difference.

Guilhem, what do we actually compare: same kernel, just patched vs
unpached? Or these are 2 different kernels, and one of them was
patched.

What does 'uname -r'  say for the "with" and "without" kernels?

Did you compile both kernels yourself and the only difference between
them is the intel_idle patch?
Rafael J. Wysocki Aug. 26, 2020, 4:41 p.m. UTC | #20
On Wed, Aug 26, 2020 at 6:19 PM Artem Bityutskiy <dedekind1@gmail.com> wrote:
>
> Indeed, when I compare them:
>
> acpi_idle (without the patch):

Does this come from the Guilhem's data?  It's intel_idle in both
cases, but in the "without the patch" case it uses ACPI.

> CPU%c1  CPU%c6  CPU%c7  CoreTmp PkgTmp  GFX%rc6 Pkg%pc2 Pkg%pc3 Pkg%pc6 Pkg%pc7 Pkg%pc8 Pkg%pc9 Pk%pc10 PkgWatt
> 29.48   0.00    60.71   58      58      97.96   16.96   0.00    0.00    0.00    0.00    0.00    0.00    6.08

and I get the same data here, but

> intel_idle (with the patch):
>
> CPU%c1  CPU%c6  CPU%c7  CoreTmp PkgTmp  GFX%rc6 Pkg%pc2 Pkg%pc3 Pkg%pc6 Pkg%pc7 Pkg%pc8 Pkg%pc9 Pk%pc10 PkgWatt
> 56      56      96.64   300     68.29   48.58   0.00    0.00    0.00    0.00    0.00    0.00    7.38    0.00

you seem to have columns wrong here.

I get something like this

CPU%c1     CPU%c6     CPU%c7     CoreTmp PkgTmp     GFX%rc6 GFXMHz
Totl%C0 Any%C0     GFX%C0     CPUGFX% Pkg%pc2    Pkg%pc3 Pkg%pc6
Pkg%pc7 Pkg%pc8 Pkg%pc9 Pk%pc10
16.07     26.24     49.10     56     56     96.64     300     68.29
 48.58     3.08     2.10     30.36     0.04     0.00     0.00     0.00
    0.00     0.00

so still no PC10 residency (and it would be rather strange to get PC10
residency without any PC6 or higher residency).  The 7.38 is the
PkgWatt number AFAICS.

> With intel_idle we reach PC10, without it we only go as deep as PC2 - huge difference.

Not really.  We don't get any PC10 residency in both cases.

> I really wonder why the BIOS does not expose deeper C-states...

It does expose C10.

> And if it does not, is this for a reason? And how windows works then?

It can only expose 3 C-states and it chose to expose C1, C7s and C10.

> May be there is a BIOS update that fixes this problem? May be Windows
> user get it quickly because stuff like this is often well-integrated in
> Windows? Would you please check if there is newer BIOS?

I doubt it.

Cheers!
Rafael J. Wysocki Aug. 26, 2020, 4:43 p.m. UTC | #21
On Wed, Aug 26, 2020 at 6:39 PM Artem Bityutskiy <dedekind1@gmail.com> wrote:
>
> On Wed, 2020-08-26 at 18:02 +0200, Rafael J. Wysocki wrote:
> > To that end, I would try to upgrade the graphics firmware and see if
> > you can get some nonzero PC8 residency then.
>
> I am curious, somehow that patch makes a difference.

It does make a difference, because it makes the processor spend more
time in PC2.  Which very well may be because the processor cannot
enter deeper C-states.
Guilhem Lettron Aug. 26, 2020, 4:46 p.m. UTC | #22
I've done more tests, maybe it can give you more hints.
I don't see that much differences between both (with and without
patches) in this cases.
Artem Bityutskiy Aug. 26, 2020, 4:52 p.m. UTC | #23
On Wed, 2020-08-26 at 18:43 +0200, Rafael J. Wysocki wrote:
> > I am curious, somehow that patch makes a difference.
> 
> It does make a difference, because it makes the processor spend more
> time in PC2.  Which very well may be because the processor cannot
> enter deeper C-states.

OK, you are right, we do not indeed have PC10 in both cases. The file
was wrapped and I unwrapped it incorrectly. So indeed this is the real
problem to solve, and the patch does not solve it.
Rafael J. Wysocki Aug. 26, 2020, 5 p.m. UTC | #24
On Wed, Aug 26, 2020 at 6:46 PM Guilhem Lettron <guilhem@barpilot.io> wrote:
>
> I've done more tests, maybe it can give you more hints.
> I don't see that much differences between both (with and without
> patches) in this cases.

OK, thanks!

I'm assuming that the topmost two sets of data are for the "without
the patch" case whereas the other three correspond to the "with the
patch" case.

If so, the processor clearly enters PC10 in both cases and the
residency percentages are similar.

The numbers of times the POLL state was selected in the first test
look kind of unusual (relatively very large), but other than this the
patch doesn't seem to make much of a difference, so I'm not going to
apply it.

Thanks!
Zhang, Rui Aug. 26, 2020, 5:47 p.m. UTC | #25
On Wed, 2020-08-26 at 19:00 +0200, Rafael J. Wysocki wrote:
> On Wed, Aug 26, 2020 at 6:46 PM Guilhem Lettron <guilhem@barpilot.io>
> wrote:
> > 
> > I've done more tests, maybe it can give you more hints.
> > I don't see that much differences between both (with and without
> > patches) in this cases.
> 
> OK, thanks!
> 
> I'm assuming that the topmost two sets of data are for the "without
> the patch" case whereas the other three correspond to the "with the
> patch" case.

I think the sample period is too short.
Even with the same kernel, I can see the Busy% varies from 1% to 9%,
and the PkgWatt varies from 0.4W to 2.4W.

thanks,
rui

> 
> If so, the processor clearly enters PC10 in both cases and the
> residency percentages are similar.
> 
> The numbers of times the POLL state was selected in the first test
> look kind of unusual (relatively very large), but other than this the
> patch doesn't seem to make much of a difference, so I'm not going to
> apply it.
> 
> Thanks!
diff mbox series

Patch

diff --git a/drivers/idle/intel_idle.c b/drivers/idle/intel_idle.c
index 8e0fb1a5bdbd..1bb539f09a4f 100644
--- a/drivers/idle/intel_idle.c
+++ b/drivers/idle/intel_idle.c
@@ -1145,6 +1145,8 @@  static const struct x86_cpu_id intel_idle_ids[] __initconst = {
 	X86_MATCH_INTEL_FAM6_MODEL(KABYLAKE_L,		&idle_cpu_skl),
 	X86_MATCH_INTEL_FAM6_MODEL(KABYLAKE,		&idle_cpu_skl),
 	X86_MATCH_INTEL_FAM6_MODEL(SKYLAKE_X,		&idle_cpu_skx),
+	X86_MATCH_INTEL_FAM6_MODEL(ICELAKE,		&idle_cpu_skl),
+	X86_MATCH_INTEL_FAM6_MODEL(ICELAKE_L,		&idle_cpu_skl),
 	X86_MATCH_INTEL_FAM6_MODEL(ICELAKE_X,		&idle_cpu_icx),
 	X86_MATCH_INTEL_FAM6_MODEL(XEON_PHI_KNL,	&idle_cpu_knl),
 	X86_MATCH_INTEL_FAM6_MODEL(XEON_PHI_KNM,	&idle_cpu_knl),