[PATCH] acpi/s3: fine-tune measure of suspend time
Alex Hung
alex.hung at canonical.com
Wed Oct 30 17:44:01 UTC 2019
The time variation can be reduced. For example, the original suspend
time:
Suspend: 3.966 seconds.
Suspend: 0.539 seconds.
Suspend: 1.156 seconds.
After patched:
Suspend: 0.486 seconds.
Suspend: 0.508 seconds.
Suspend: 0.528 seconds.
This is especially true for 1st suspend when kernel is busy with other
kernel modules such as
[ 120.123903] fwts: Suspend
[ 120.162215] wlp60s0: deauthenticating from ...
[ 123.726367] PM: suspend entry (deep)
Signed-off-by: Alex Hung <alex.hung at canonical.com>
---
src/acpi/s3/s3.c | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/src/acpi/s3/s3.c b/src/acpi/s3/s3.c
index 6664db2c..5ec8d5c8 100644
--- a/src/acpi/s3/s3.c
+++ b/src/acpi/s3/s3.c
@@ -411,6 +411,13 @@ static int s3_scan_times(
s3_suspend_start = ts;
continue;
}
+
+ /* Update log time if this is available */
+ if (strstr(txt, "PM: suspend entry")) {
+ s3_suspend_start = ts;
+ continue;
+ }
+
if (strstr(txt, FWTS_RESUME)) {
s3_resume_finish = ts;
continue;
--
2.17.1
More information about the fwts-devel
mailing list