LKML Archive on lore.kernel.org
 help / color / Atom feed
* Intel PMC driver on Broadwell system to gather C-State statistics
@ 2020-10-18  8:28 Paul Menzel
       [not found] ` <MW3PR11MB45227983D95C8F0B3F611335A1010@MW3PR11MB4522.namprd11.prod.outlook.com>
  0 siblings, 1 reply; 2+ messages in thread
From: Paul Menzel @ 2020-10-18  8:28 UTC (permalink / raw)
  To: Rajneesh Bhardwaj, David E Box
  Cc: platform-driver-x86, Mika Westerberg, Zha Qipeng,
	Mario Limonciello, LKML

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

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: Intel PMC driver on Broadwell system to gather C-State statistics
       [not found] ` <MW3PR11MB45227983D95C8F0B3F611335A1010@MW3PR11MB4522.namprd11.prod.outlook.com>
@ 2020-10-18 20:25   ` Box, David E
  0 siblings, 0 replies; 2+ messages in thread
From: Box, David E @ 2020-10-18 20:25 UTC (permalink / raw)
  To: Paul Menzel, Rajneesh Bhardwaj, Vivi, Rodrigo, David E. Box
  Cc: platform-driver-x86, Mika Westerberg, Zha, Qipeng,
	Mario Limonciello, LKML

From: Box, David E <david.e.box@intel.com>
Sent: Sunday, October 18, 2020 11:11 AM
To: Paul Menzel <pmenzel@molgen.mpg.de>; Rajneesh Bhardwaj <irenic.rajneesh@gmail.com>; Vivi, Rodrigo <rodrigo.vivi@intel.com>
Cc: platform-driver-x86@vger.kernel.org <platform-driver-x86@vger.kernel.org>; Mika Westerberg <mika.westerberg@linux.intel.com>; Zha, Qipeng <qipeng.zha@intel.com>; Mario Limonciello <mario.limonciello@dell.com>; LKML <linux-kernel@vger.kernel.org>
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 <pmenzel@molgen.mpg.de>
Sent: Sunday, October 18, 2020 1:28:06 AM
To: Rajneesh Bhardwaj <irenic.rajneesh@gmail.com>; Box, David E <david.e.box@intel.com>
Cc: platform-driver-x86@vger.kernel.org <platform-driver-x86@vger.kernel.org>; Mika Westerberg <mika.westerberg@linux.intel.com>; Zha, Qipeng <qipeng.zha@intel.com>; Mario Limonciello <mario.limonciello@dell.com>; LKML <linux-kernel@vger.kernel.org>
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

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, back to index

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-10-18  8:28 Intel PMC driver on Broadwell system to gather C-State statistics Paul Menzel
     [not found] ` <MW3PR11MB45227983D95C8F0B3F611335A1010@MW3PR11MB4522.namprd11.prod.outlook.com>
2020-10-18 20:25   ` Box, David E

LKML Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/lkml/0 lkml/git/0.git
	git clone --mirror https://lore.kernel.org/lkml/1 lkml/git/1.git
	git clone --mirror https://lore.kernel.org/lkml/2 lkml/git/2.git
	git clone --mirror https://lore.kernel.org/lkml/3 lkml/git/3.git
	git clone --mirror https://lore.kernel.org/lkml/4 lkml/git/4.git
	git clone --mirror https://lore.kernel.org/lkml/5 lkml/git/5.git
	git clone --mirror https://lore.kernel.org/lkml/6 lkml/git/6.git
	git clone --mirror https://lore.kernel.org/lkml/7 lkml/git/7.git
	git clone --mirror https://lore.kernel.org/lkml/8 lkml/git/8.git
	git clone --mirror https://lore.kernel.org/lkml/9 lkml/git/9.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 lkml lkml/ https://lore.kernel.org/lkml \
		linux-kernel@vger.kernel.org
	public-inbox-index lkml

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.kernel.vger.linux-kernel


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git