Bug 202523

Summary: Extremely long acpi_s2idle_prepare & acpi_s2idle_restore on Dell 9370 freeze
Product: ACPI Reporter: Todd Brandt (todd.e.brandt)
Component: BIOSAssignee: Zhang Rui (rui.zhang)
Status: CLOSED CODE_FIX    
Severity: normal CC: rui.zhang
Priority: P1    
Hardware: Intel   
OS: Linux   
Kernel Version: 5.0.0-rc4 Subsystem:
Regression: No Bisected commit-id:
Bug Depends on:    
Bug Blocks: 178231    
Attachments: dell-9370_freeze-acpi_s2idle_prepare.html
dell-9370_freeze-acpi_s2idle_restore.html
dsdt.dsl
issue.def
issue.def

Description Todd Brandt 2019-02-07 16:44:00 UTC
Created attachment 281039 [details]
dell-9370_freeze-acpi_s2idle_prepare.html

We run a 24+ hour S2idle (freeze) stress test on various machines in our lab, and discovered some odd behavior on this machine:

Dell Inc. XPS 13 9370 with Intel(R) Core(TM) i5-8250U CPU @ 1.60GHz

The acpi_s2idle_prepare and acpi_s2idle_restore functions take a few milliseconds in most of the test runs, but rarely they take an extreme amount of time:

Instance #1 (happens 1/3160 times): acpi_s2idle_prepare takes 45 seconds and causes the freeze to abort in suspend_noirq:
(see attachments) dell-9370_freeze-acpi_s2idle_prepare.html

Instance #2 (happens 1/3160 times): acpi_s2idle_restore takes 45 seconds and but eventually the reeeze resume completed:
(see attachments) dell-9370_freeze-acpi_s2idle_restore.html

Both times the code is stuck in acpi_ps_parse_aml for the entire function call, this something is happening in BIOS.
Comment 1 Todd Brandt 2019-02-07 16:44:26 UTC
Created attachment 281041 [details]
dell-9370_freeze-acpi_s2idle_restore.html
Comment 2 Todd Brandt 2019-02-14 21:56:02 UTC
Created attachment 281147 [details]
dsdt.dsl

The latest sleepgraph installs a kprobe over the acpi_ps_execute_method function and pulls out the full path of the AML code being executed. This is what's being executed by both these calls:

\_SB.PEPD._DSM
Comment 3 Zhang Rui 2019-03-26 13:43:27 UTC
can you please attach the full acpidump output?
Comment 4 Todd Brandt 2019-04-26 03:23:55 UTC
Created attachment 282535 [details]
issue.def
Comment 5 Todd Brandt 2019-05-09 12:35:53 UTC
Created attachment 282699 [details]
issue.def

change max time from 500ms to 80ms, since anything over 80 is bad.
Comment 6 Zhang Rui 2019-09-03 06:57:55 UTC
hmmm, we don't have 9370 running suspend stress test for recent weeks.
let's see how things are going when we get 9370 back.
Comment 7 Zhang Rui 2020-06-29 07:52:24 UTC
Checked latest suspend_stress test results with v.57 and v5.8-rc1, the problem does not exist.
Bug closed.