mbox series

[v2,0/2,SRU,J,K] System freeze after resuming from suspend due to PCI ASPM settings

Message ID 20220825015618.39518-1-acelan.kao@canonical.com
Headers show
Series System freeze after resuming from suspend due to PCI ASPM settings | expand

Message

AceLan Kao Aug. 25, 2022, 1:56 a.m. UTC
From: "Chia-Lin Kao (AceLan)" <acelan.kao@canonical.com>

BugLink: https://bugs.launchpad.net/bugs/1980829

[Impact]
While doing some tests such as suspend/resume or CPU stress tests the system would hang.

[Fix]
The 2 commits fix the issue, but still not get accepted yet.
https://patchwork.ozlabs.org/project/linux-pci/patch/20220705060014.10050-1-vidyas@nvidia.com/
https://patchwork.ozlabs.org/project/linux-pci/patch/20220509073639.2048236-1-kai.heng.feng@canonical.com/

So, I created a DMI quirk to make the patches only affects on listed platforms.

[Test]
Verified on the failed machines and ODM also verified on their side.

[Where problems could occur]
The patches only affects on the listed platforms, and won't affect other platforms.

Chia-Lin Kao (AceLan) (1):
  UBUNTU: SAUCE: whitelist platforms that needs save/restore ASPM L1SS
    for suspend/resume

Vidya Sagar (1):
  UBUNTU: SAUCE: PCI/ASPM: Save/restore L1SS Capability for
    suspend/resume

 drivers/pci/pci.c       | 30 +++++++++++++++++++++++++++-
 drivers/pci/pci.h       |  4 ++++
 drivers/pci/pcie/aspm.c | 44 +++++++++++++++++++++++++++++++++++++++++
 3 files changed, 77 insertions(+), 1 deletion(-)

Comments

Kai-Heng Feng Aug. 25, 2022, 3:52 a.m. UTC | #1
On Thu, Aug 25, 2022 at 9:56 AM AceLan Kao <acelan.kao@canonical.com> wrote:
>
> From: "Chia-Lin Kao (AceLan)" <acelan.kao@canonical.com>
>
> BugLink: https://bugs.launchpad.net/bugs/1980829
>
> [Impact]
> While doing some tests such as suspend/resume or CPU stress tests the system would hang.
>
> [Fix]
> The 2 commits fix the issue, but still not get accepted yet.
> https://patchwork.ozlabs.org/project/linux-pci/patch/20220705060014.10050-1-vidyas@nvidia.com/
> https://patchwork.ozlabs.org/project/linux-pci/patch/20220509073639.2048236-1-kai.heng.feng@canonical.com/
>
> So, I created a DMI quirk to make the patches only affects on listed platforms.
>
> [Test]
> Verified on the failed machines and ODM also verified on their side.
>
> [Where problems could occur]
> The patches only affects on the listed platforms, and won't affect other platforms.
>
> Chia-Lin Kao (AceLan) (1):
>   UBUNTU: SAUCE: whitelist platforms that needs save/restore ASPM L1SS
>     for suspend/resume
>
> Vidya Sagar (1):
>   UBUNTU: SAUCE: PCI/ASPM: Save/restore L1SS Capability for
>     suspend/resume

Acked-by: Kai-Heng Feng <kai.heng.feng@canonical.com>

>
>  drivers/pci/pci.c       | 30 +++++++++++++++++++++++++++-
>  drivers/pci/pci.h       |  4 ++++
>  drivers/pci/pcie/aspm.c | 44 +++++++++++++++++++++++++++++++++++++++++
>  3 files changed, 77 insertions(+), 1 deletion(-)
>
> --
> 2.25.1
>
>
> --
> kernel-team mailing list
> kernel-team@lists.ubuntu.com
> https://lists.ubuntu.com/mailman/listinfo/kernel-team
Aaron Ma Aug. 25, 2022, 4 a.m. UTC | #2
On 8/25/22 09:56, AceLan Kao wrote:
> From: "Chia-Lin Kao (AceLan)" <acelan.kao@canonical.com>
> 
> BugLink: https://bugs.launchpad.net/bugs/1980829
> 
> [Impact]
> While doing some tests such as suspend/resume or CPU stress tests the system would hang.
> 
> [Fix]
> The 2 commits fix the issue, but still not get accepted yet.
> https://patchwork.ozlabs.org/project/linux-pci/patch/20220705060014.10050-1-vidyas@nvidia.com/
> https://patchwork.ozlabs.org/project/linux-pci/patch/20220509073639.2048236-1-kai.heng.feng@canonical.com/
> 
> So, I created a DMI quirk to make the patches only affects on listed platforms.
> 
> [Test]
> Verified on the failed machines and ODM also verified on their side.
> 
> [Where problems could occur]
> The patches only affects on the listed platforms, and won't affect other platforms.
> 
> Chia-Lin Kao (AceLan) (1):
>    UBUNTU: SAUCE: whitelist platforms that needs save/restore ASPM L1SS
>      for suspend/resume
> 
> Vidya Sagar (1):
>    UBUNTU: SAUCE: PCI/ASPM: Save/restore L1SS Capability for
>      suspend/resume
> 

Acked-by: Aaron Ma <aaron.ma@canonical.com>

>   drivers/pci/pci.c       | 30 +++++++++++++++++++++++++++-
>   drivers/pci/pci.h       |  4 ++++
>   drivers/pci/pcie/aspm.c | 44 +++++++++++++++++++++++++++++++++++++++++
>   3 files changed, 77 insertions(+), 1 deletion(-)
>
Stefan Bader Aug. 26, 2022, 8:11 a.m. UTC | #3
On 25.08.22 03:56, AceLan Kao wrote:
> From: "Chia-Lin Kao (AceLan)" <acelan.kao@canonical.com>
> 
> BugLink: https://bugs.launchpad.net/bugs/1980829
> 
> [Impact]
> While doing some tests such as suspend/resume or CPU stress tests the system would hang.
> 
> [Fix]
> The 2 commits fix the issue, but still not get accepted yet.
> https://patchwork.ozlabs.org/project/linux-pci/patch/20220705060014.10050-1-vidyas@nvidia.com/
> https://patchwork.ozlabs.org/project/linux-pci/patch/20220509073639.2048236-1-kai.heng.feng@canonical.com/
> 
> So, I created a DMI quirk to make the patches only affects on listed platforms.
> 
> [Test]
> Verified on the failed machines and ODM also verified on their side.
> 
> [Where problems could occur]
> The patches only affects on the listed platforms, and won't affect other platforms.
> 
> Chia-Lin Kao (AceLan) (1):
>    UBUNTU: SAUCE: whitelist platforms that needs save/restore ASPM L1SS
>      for suspend/resume
> 
> Vidya Sagar (1):
>    UBUNTU: SAUCE: PCI/ASPM: Save/restore L1SS Capability for
>      suspend/resume
> 
>   drivers/pci/pci.c       | 30 +++++++++++++++++++++++++++-
>   drivers/pci/pci.h       |  4 ++++
>   drivers/pci/pcie/aspm.c | 44 +++++++++++++++++++++++++++++++++++++++++
>   3 files changed, 77 insertions(+), 1 deletion(-)
> 

Ok, what I did not realize initially is that the state_change function will be 
done for all cases which are NOT whitelisted and save/restore are done for 
systems which ARE whitelisted. So for systems which are not explicitly marked 
for the new functionality nothing changes.

Acked-by: Stefan Bader <stefan.bader@canonical.com>
Stefan Bader Aug. 26, 2022, 8:43 a.m. UTC | #4
On 25.08.22 03:56, AceLan Kao wrote:
> From: "Chia-Lin Kao (AceLan)" <acelan.kao@canonical.com>
> 
> BugLink: https://bugs.launchpad.net/bugs/1980829
> 
> [Impact]
> While doing some tests such as suspend/resume or CPU stress tests the system would hang.
> 
> [Fix]
> The 2 commits fix the issue, but still not get accepted yet.
> https://patchwork.ozlabs.org/project/linux-pci/patch/20220705060014.10050-1-vidyas@nvidia.com/
> https://patchwork.ozlabs.org/project/linux-pci/patch/20220509073639.2048236-1-kai.heng.feng@canonical.com/
> 
> So, I created a DMI quirk to make the patches only affects on listed platforms.
> 
> [Test]
> Verified on the failed machines and ODM also verified on their side.
> 
> [Where problems could occur]
> The patches only affects on the listed platforms, and won't affect other platforms.
> 
> Chia-Lin Kao (AceLan) (1):
>    UBUNTU: SAUCE: whitelist platforms that needs save/restore ASPM L1SS
>      for suspend/resume
> 
> Vidya Sagar (1):
>    UBUNTU: SAUCE: PCI/ASPM: Save/restore L1SS Capability for
>      suspend/resume
> 
>   drivers/pci/pci.c       | 30 +++++++++++++++++++++++++++-
>   drivers/pci/pci.h       |  4 ++++
>   drivers/pci/pcie/aspm.c | 44 +++++++++++++++++++++++++++++++++++++++++
>   3 files changed, 77 insertions(+), 1 deletion(-)
> 

Applied to jammy:linux/master-next. Thanks.

-Stefan
Paolo Pisati Sept. 13, 2022, 9:49 a.m. UTC | #5
On Thu, Aug 25, 2022 at 09:56:15AM +0800, AceLan Kao wrote:
> From: "Chia-Lin Kao (AceLan)" <acelan.kao@canonical.com>
> 
> BugLink: https://bugs.launchpad.net/bugs/1980829
Timo Aaltonen Jan. 5, 2023, 9:39 a.m. UTC | #6
AceLan Kao kirjoitti 25.8.2022 klo 4.56:
> From: "Chia-Lin Kao (AceLan)" <acelan.kao@canonical.com>
> 
> BugLink: https://bugs.launchpad.net/bugs/1980829
> 
> [Impact]
> While doing some tests such as suspend/resume or CPU stress tests the system would hang.
> 
> [Fix]
> The 2 commits fix the issue, but still not get accepted yet.
> https://patchwork.ozlabs.org/project/linux-pci/patch/20220705060014.10050-1-vidyas@nvidia.com/
> https://patchwork.ozlabs.org/project/linux-pci/patch/20220509073639.2048236-1-kai.heng.feng@canonical.com/
> 
> So, I created a DMI quirk to make the patches only affects on listed platforms.
> 
> [Test]
> Verified on the failed machines and ODM also verified on their side.
> 
> [Where problems could occur]
> The patches only affects on the listed platforms, and won't affect other platforms.
> 
> Chia-Lin Kao (AceLan) (1):
>    UBUNTU: SAUCE: whitelist platforms that needs save/restore ASPM L1SS
>      for suspend/resume
> 
> Vidya Sagar (1):
>    UBUNTU: SAUCE: PCI/ASPM: Save/restore L1SS Capability for
>      suspend/resume
> 
>   drivers/pci/pci.c       | 30 +++++++++++++++++++++++++++-
>   drivers/pci/pci.h       |  4 ++++
>   drivers/pci/pcie/aspm.c | 44 +++++++++++++++++++++++++++++++++++++++++
>   3 files changed, 77 insertions(+), 1 deletion(-)
> 

These are missing from unstable/lunar/oem-6.1, and don't seem to apply 
there without violence. Mind checking it out and resending for these at 
some point?