Bug 217775 - AHCI: adl ahci controller blocks cpu cstate(stuck on PC2) during suspending
Summary: AHCI: adl ahci controller blocks cpu cstate(stuck on PC2) during suspending
Status: NEW
Alias: None
Product: Other
Classification: Unclassified
Component: Configuration (show other bugs)
Hardware: All Linux
: P3 normal
Assignee: other_configuration@kernel-bugs.osdl.org
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-08-08 14:48 UTC by KobaKo
Modified: 2023-08-08 14:48 UTC (History)
0 users

See Also:
Kernel Version:
Subsystem:
Regression: No
Bisected commit-id:


Attachments

Description KobaKo 2023-08-08 14:48:08 UTC
Symptom:
the Alder laker AHCI controller's default pm policy is max_performance
~~~
u@ubuntu:~$ cat /sys/class/scsi_host/host1/link_power_management_policy 
max_performance
~~~

During suspending, CPU cstate is blocked and stuck on PC2.
~~~
u@ubuntu:~$ sudo cat /sys/kernel/debug/pmc_core/slp_s0_residency_usec;sudo cat /sys/kernel/debug/pmc_core/package_cstate_show
8520660
Package C2 : 10312889
Package C3 : 0
Package C6 : 0
Package C7 : 0
Package C8 : 0
Package C9 : 0
Package C10 : 0
~~~

if configure AHCI controller as LPM, CPU goes deeper than PC2
~~~
--- a/drivers/ata/ahci.c
+++ b/drivers/ata/ahci.c
@@ -422,6 +422,7 @@ static const struct pci_device_id ahci_pci_tbl[] = {
        { PCI_VDEVICE(INTEL, 0x34d3), board_ahci_low_power }, /* Ice Lake LP AHCI */
        { PCI_VDEVICE(INTEL, 0x02d3), board_ahci_low_power }, /* Comet Lake PCH-U AHCI */
        { PCI_VDEVICE(INTEL, 0x02d7), board_ahci_low_power }, /* Comet Lake PCH RAID */
+       { PCI_VDEVICE(INTEL, 0x7ae2), board_ahci_low_power }, /* Alder Lake AHCI*/
 
        /* JMicron 360/1/3/5/6, match class to avoid IDE function */
        { PCI_VENDOR_ID_JMICRON, PCI_ANY_ID, PCI_ANY_ID, PCI_ANY_ID,
~~~
u@ubuntu:~$ sudo cat /sys/kernel/debug/pmc_core/slp_s0_residency_usec;sudo cat /sys/kernel/debug/pmc_core/package_cstate_show
8520660
Package C2 : 12904327
Package C3 : 0
Package C6 : 0
Package C7 : 0
Package C8 : 0
Package C9 : 0
Package C10 : 0
u@ubuntu:~$ sudo rtcwake -m mem -s 10
rtcwake: assuming RTC uses UTC ...
rtcwake: wakeup from "mem" using /dev/rtc0 at Wed Aug  2 03:47:36 2023
u@ubuntu:~$ sudo cat /sys/kernel/debug/pmc_core/slp_s0_residency_usec;sudo cat /sys/kernel/debug/pmc_core/package_cstate_show
7912890
Package C2 : 28811737
Package C3 : 52
Package C6 : 343788
Package C7 : 0
Package C8 : 16056
Package C9 : 0
Package C10 : 8923812
~~~

but TGL AHCI with LPM causes the regression, the commit has been reverted.
Ref: https://bugzilla.kernel.org/show_bug.cgi?id=217114

Note You need to log in before you can comment on or make changes to this bug.