Bug 198583 - `acpi_pm_finish()` takes over 140 ms during suspend
Summary: `acpi_pm_finish()` takes over 140 ms during suspend
Status: RESOLVED DUPLICATE of bug 198909
Alias: None
Product: ACPI
Classification: Unclassified
Component: Other (show other bugs)
Hardware: All Linux
: P1 normal
Assignee: Zhang Rui
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-01-25 08:34 UTC by Paul Menzel
Modified: 2018-03-26 08:09 UTC (History)
3 users (show)

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


Attachments
Compressed HTML output of `sudo ./sleepgraph.py -config config/suspend-callgraph.cfg` (3.41 MB, application/x-7z-compressed)
2018-01-25 08:34 UTC, Paul Menzel
Details
Screenshot from HTML output of `sleepgraph.py` (176.55 KB, image/png)
2018-01-25 08:36 UTC, Paul Menzel
Details
`acpidump -o …` (673.66 KB, text/plain)
2018-01-25 08:38 UTC, Paul Menzel
Details

Description Paul Menzel 2018-01-25 08:34:24 UTC
Created attachment 273855 [details]
Compressed HTML output of `sudo ./sleepgraph.py -config config/suspend-callgraph.cfg`

On the TUXEDO Book BU1406 [1], benchmarking suspend times with `sudo ./sleepgraph.py -config config/suspend-callgraph.cfg` [2], it turns out that `acpi_pm_finish()` takes over 140 ms.

> acpi_pm_finish (144.631 ms) resume_machine

Looking into the “children”, the following method takes the longest time.

> acpi_ps_parse_aml (143.203 ms @ 570.791149)

Please find the compressed HTML file attached. The output of `acpidump` follows.

[1] https://www.tuxedocomputers.com/
[2] https://github.com/01org/pm-graph
Comment 1 Paul Menzel 2018-01-25 08:36:00 UTC
Created attachment 273857 [details]
Screenshot from HTML output of `sleepgraph.py`
Comment 2 Paul Menzel 2018-01-25 08:38:13 UTC
Created attachment 273859 [details]
`acpidump -o …`
Comment 3 Zhang Rui 2018-01-29 06:00:10 UTC
it is probably caused by the EC transactions. We used to have a patch to fix it, but the patch was reverted later because of regressions.
can you please try 4.12 kernel (which contains the patch) and see if the problem is gone?
Comment 4 Paul Menzel 2018-01-29 12:08:14 UTC
(In reply to Zhang Rui from comment #3)
> it is probably caused by the EC transactions. We used to have a patch to fix
> it, but the patch was reverted later because of regressions.
> can you please try 4.12 kernel (which contains the patch) and see if the
> problem is gone?

True. I guess you mean bug #185611 and commit c3a696b6e8f8 (ACPI / EC: Use busy polling mode when GPE is not enabled) and the revert commit 	662591461c (ACPI / EC: Drop EC noirq hooks to fix a regression) [1].

I’ll try to test that.

[1] https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit?id=66259146
Comment 5 Paul Menzel 2018-02-13 15:45:23 UTC
I tested the commit,  but it didn’t improve anything. It could be that PTI is at fault though, cf. bug 185611, comment 52 [1].

[1] https://bugzilla.kernel.org/show_bug.cgi?id=185611#c52
Comment 6 Chen Yu 2018-03-16 04:23:46 UTC
(In reply to Paul Menzel from comment #5)
> I tested the commit,  but it didn’t improve anything. It could be that PTI
> is at fault though, cf. bug 185611, comment 52 [1].
> 
> [1] https://bugzilla.kernel.org/show_bug.cgi?id=185611#c52
OK, 
Does it help to disable the pti by appending nopti?
Comment 7 Chen Yu 2018-03-26 08:01:36 UTC
@Paul,
Do you have a chance to confirm this?
Comment 8 Chen Yu 2018-03-26 08:09:00 UTC
Assumed to be duplicated of 198909, let's move there and debug then.

*** This bug has been marked as a duplicate of bug 198909 ***

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