2020-10-18 08:35:27

by Paul Menzel

[permalink] [raw]
Subject: Intel PMC driver on Broadwell system to gather C-State statistics

Dear Linux folks,


The Intel Broadwell-U laptop Dell Latitude E7250 (BIOS A19 01/23/2018),
according to PowerTOP, only reaches package C-State C7 and not C8, C9,
C10, while the four CPUs itself do reach C-State C10 and CE.

I was asked to look at:

1. `/sys/kernel/debug/pmc_core/package_cstate_show`
2. `/sys/kernel/debug/pmc_core/ltr`

Trying to gather statistics, after the Debian Linux kernel 5.9.1 is now
built with `INTEL_PMC_CORE=y`, `/sys/kernel/debug/pmc_core/` is still
not created despite `sudo modprobe intel_pmc_core` being successful.
(It’s not loaded automatically.)

[ 1063.644680] calling pmc_core_driver_init+0x0/0x1000
[intel_pmc_core] @ 4252
[ 1063.644721] initcall pmc_core_driver_init+0x0/0x1000
[intel_pmc_core] returned 0 after 36 usecs

The ACPI device `INT33A1` is there.

> Scope (_SB)
> {
> Device (PEPD)
> {
> Name (_HID, "INT33A1" /* Intel Power Engine */) // _HID: Hardware ID
> Name (_CID, EisaId ("PNP0D80") /* Windows-compatible System Power Management Controller */) // _CID: Compatible ID
> Name (_UID, One) // _UID: Unique ID
> Name (PEPP, Zero)
> Name (DEVS, Package (0x03)
> {
> 0x02,
> Package (0x01)
> {
> "\\_SB.PCI0.GFX0"
> },
>
> Package (0x01)
> {
> "\\_SB.PCI0.SAT0.PRT1"
> }
> })
> Name (DEVX, Package (0x08)

The table `intel_pmc_core_ids` does not contain the Broadwell-U ID
though, so I guess it’s not supported.

> $ lspci -nn
> 00:00.0 Host bridge [0600]: Intel Corporation Broadwell-U Host Bridge -OPI [8086:1604] (rev 09)
> 00:02.0 VGA compatible controller [0300]: Intel Corporation HD Graphics 5500 [8086:1616] (rev 09)
> 00:03.0 Audio device [0403]: Intel Corporation Broadwell-U Audio Controller [8086:160c] (rev 09)
> 00:04.0 Signal processing controller [1180]: Intel Corporation Broadwell-U Processor Thermal Subsystem [8086:1603] (rev 09)
> 00:14.0 USB controller [0c03]: Intel Corporation Wildcat Point-LP USB xHCI Controller [8086:9cb1] (rev 03)
> 00:16.0 Communication controller [0780]: Intel Corporation Wildcat Point-LP MEI Controller #1 [8086:9cba] (rev 03)
> 00:19.0 Ethernet controller [0200]: Intel Corporation Ethernet Connection (3) I218-LM [8086:15a2] (rev 03)
> 00:1b.0 Audio device [0403]: Intel Corporation Wildcat Point-LP High Definition Audio Controller [8086:9ca0] (rev 03)
> 00:1c.0 PCI bridge [0604]: Intel Corporation Wildcat Point-LP PCI Express Root Port #1 [8086:9c90] (rev e3)
> 00:1c.3 PCI bridge [0604]: Intel Corporation Wildcat Point-LP PCI Express Root Port #4 [8086:9c96] (rev e3)
> 00:1d.0 USB controller [0c03]: Intel Corporation Wildcat Point-LP USB EHCI Controller [8086:9ca6] (rev 03)
> 00:1f.0 ISA bridge [0601]: Intel Corporation Wildcat Point-LP LPC Controller [8086:9cc3] (rev 03)
> 00:1f.2 SATA controller [0106]: Intel Corporation Wildcat Point-LP SATA Controller [AHCI Mode] [8086:9c83] (rev 03)
> 00:1f.3 SMBus [0c05]: Intel Corporation Wildcat Point-LP SMBus Controller [8086:9ca2] (rev 03)
> 01:00.0 SD Host controller [0805]: O2 Micro, Inc. SD/MMC Card Reader Controller [1217:8520] (rev 01)
> 02:00.0 Network controller [0280]: Intel Corporation Wireless 7265 [8086:095a] (rev 59)

Any idea, why the probe function `pmc_core_probe()` succeeds, despite
the code below?

cpu_id = x86_match_cpu(intel_pmc_core_ids);
if (!cpu_id)
return -ENODEV;

The watchdog driver iTCO_wdt seems to load the module `pmc_core_bxt`
despite I am unable to find the ACPI device `INT34D2` in the dissembled
AML/ASL files.


Kind regards,

Paul


2020-10-19 19:54:11

by Box, David E

[permalink] [raw]
Subject: Re: Intel PMC driver on Broadwell system to gather C-State statistics

From: Box, David E <[email protected]>
Sent: Sunday, October 18, 2020 11:11 AM
To: Paul Menzel <[email protected]>; Rajneesh Bhardwaj <[email protected]>; Vivi, Rodrigo <[email protected]>
Cc: [email protected] <[email protected]>; Mika Westerberg <[email protected]>; Zha, Qipeng <[email protected]>; Mario Limonciello <[email protected]>; LKML <[email protected]>
Subject: Re: Intel PMC driver on Broadwell system to gather C-State statistics
?
+Rodrigo for DMC quesiton

Hi,

If you are getting Package C7, but not C8, I'd be suspicious of the graphics display engine. However, in Skylake and beyond, this is managed by i915 DMC firmware. In the Broadwell timeframe I don't know what the requirement was. Rodrigo?

You can try turning off your display with xset for 20 seconds and then checking the Package residencies with powertop or turbostat to see if you got deeper than C7. This would at least point to graphics.

As for the PMC?driver, it does not support Broadwell. I don't believe probe is completing successfully. That's the init function.

David


From: Paul Menzel <[email protected]>
Sent: Sunday, October 18, 2020 1:28:06 AM
To: Rajneesh Bhardwaj <[email protected]>; Box, David E <[email protected]>
Cc: [email protected] <[email protected]>; Mika Westerberg <[email protected]>; Zha, Qipeng <[email protected]>; Mario Limonciello <[email protected]>; LKML <[email protected]>
Subject: Intel PMC driver on Broadwell system to gather C-State statistics
?
Dear Linux folks,


The Intel Broadwell-U laptop Dell Latitude E7250 (BIOS A19 01/23/2018),
according to PowerTOP, only reaches package C-State C7 and not C8, C9,
C10, while the four CPUs itself do reach C-State C10 and CE.

I was asked to look at:

1.? `/sys/kernel/debug/pmc_core/package_cstate_show`
2.? `/sys/kernel/debug/pmc_core/ltr`

Trying to gather statistics, after the Debian Linux kernel 5.9.1 is now
built with `INTEL_PMC_CORE=y`, `/sys/kernel/debug/pmc_core/` is still
not created despite `sudo modprobe intel_pmc_core` being successful.
(It?s not loaded automatically.)

???? [ 1063.644680] calling? pmc_core_driver_init+0x0/0x1000
[intel_pmc_core] @ 4252
???? [ 1063.644721] initcall pmc_core_driver_init+0x0/0x1000
[intel_pmc_core] returned 0 after 36 usecs

The ACPI device `INT33A1` is there.

>???? Scope (_SB)
>???? {
>???????? Device (PEPD)????????
>???????? {
>???????????? Name (_HID, "INT33A1" /* Intel Power Engine */)? // _HID: Hardware ID
>???????????? Name (_CID, EisaId ("PNP0D80") /* Windows-compatible System Power Management Controller */)? // _CID: Compatible ID
>???????????? Name (_UID, One)? // _UID: Unique ID
>???????????? Name (PEPP, Zero)
>???????????? Name (DEVS, Package (0x03)
>???????????? {???????
>???????????????? 0x02,
>???????????????? Package (0x01)
>???????????????? {
>???????????????????? "\\_SB.PCI0.GFX0"
>???????????????? },???
>????????????
>???????????????? Package (0x01)???????
>???????????????? {??????????????????????????
>???????????????????? "\\_SB.PCI0.SAT0.PRT1"
>???????????????? }
>???????????? })
>???????????? Name (DEVX, Package (0x08)

The table `intel_pmc_core_ids` does not contain the Broadwell-U ID
though, so I guess it?s not supported.

> $ lspci -nn
> 00:00.0 Host bridge [0600]: Intel Corporation Broadwell-U Host Bridge -OPI [8086:1604] (rev 09)
> 00:02.0 VGA compatible controller [0300]: Intel Corporation HD Graphics 5500 [8086:1616] (rev 09)
> 00:03.0 Audio device [0403]: Intel Corporation Broadwell-U Audio Controller [8086:160c] (rev 09)
> 00:04.0 Signal processing controller [1180]: Intel Corporation Broadwell-U Processor Thermal Subsystem [8086:1603] (rev 09)
> 00:14.0 USB controller [0c03]: Intel Corporation Wildcat Point-LP USB xHCI Controller [8086:9cb1] (rev 03)
> 00:16.0 Communication controller [0780]: Intel Corporation Wildcat Point-LP MEI Controller #1 [8086:9cba] (rev 03)
> 00:19.0 Ethernet controller [0200]: Intel Corporation Ethernet Connection (3) I218-LM [8086:15a2] (rev 03)
> 00:1b.0 Audio device [0403]: Intel Corporation Wildcat Point-LP High Definition Audio Controller [8086:9ca0] (rev 03)
> 00:1c.0 PCI bridge [0604]: Intel Corporation Wildcat Point-LP PCI Express Root Port #1 [8086:9c90] (rev e3)
> 00:1c.3 PCI bridge [0604]: Intel Corporation Wildcat Point-LP PCI Express Root Port #4 [8086:9c96] (rev e3)
> 00:1d.0 USB controller [0c03]: Intel Corporation Wildcat Point-LP USB EHCI Controller [8086:9ca6] (rev 03)
> 00:1f.0 ISA bridge [0601]: Intel Corporation Wildcat Point-LP LPC Controller [8086:9cc3] (rev 03)
> 00:1f.2 SATA controller [0106]: Intel Corporation Wildcat Point-LP SATA Controller [AHCI Mode] [8086:9c83] (rev 03)
> 00:1f.3 SMBus [0c05]: Intel Corporation Wildcat Point-LP SMBus Controller [8086:9ca2] (rev 03)
> 01:00.0 SD Host controller [0805]: O2 Micro, Inc. SD/MMC Card Reader Controller [1217:8520] (rev 01)
> 02:00.0 Network controller [0280]: Intel Corporation Wireless 7265 [8086:095a] (rev 59)

Any idea, why the probe function `pmc_core_probe()` succeeds, despite
the code below?

???????? cpu_id = x86_match_cpu(intel_pmc_core_ids);
???????? if (!cpu_id)
???????????????? return -ENODEV;

The watchdog driver iTCO_wdt seems to load the module `pmc_core_bxt`
despite I am unable to find the ACPI device `INT34D2` in the dissembled
AML/ASL files.


Kind regards,

Paul