summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaul Menzel <pmenzel@molgen.mpg.de>2022-02-21 23:06:43 +0100
committerPaul Menzel <pmenzel@molgen.mpg.de>2022-03-16 12:22:56 +0100
commit2a0d1d475e7ea1c815bee1e0692d81db9a7c909c (patch)
tree891c2a578ba85dec1f19979ae553a7a74167937a
parent05ba545ce7859392250b18c10081db25c90ed8d7 (diff)
downloadacpica-2a0d1d475e7ea1c815bee1e0692d81db9a7c909c.tar.gz
executer/exsystem: Warn about sleeps greater than 10 ms
Quick boottime is important, so warn about sleeps greater than 10 ms. Distribution Linux kernels reach initrd in 350 ms, so excessive delays should be called out. 10 ms is chosen randomly, but three of such delays would already make up ten percent of the boottime.
-rw-r--r--source/components/executer/exsystem.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/source/components/executer/exsystem.c b/source/components/executer/exsystem.c
index 7552de835..0a6d33c16 100644
--- a/source/components/executer/exsystem.c
+++ b/source/components/executer/exsystem.c
@@ -339,6 +339,16 @@ AcpiExSystemDoSleep (
AcpiExExitInterpreter ();
/*
+ * Warn users about excessive sleep times, so ASL code can be improved to
+ * use polling or similar techniques.
+ */
+ if (HowLongMs > 10)
+ {
+ ACPI_WARNING ((AE_INFO,
+ "Firmware issue: Excessive sleep time (%llu ms > 10 ms) in ACPI Control Method", HowLongUs));
+ }
+
+ /*
* For compatibility with other ACPI implementations and to prevent
* accidental deep sleeps, limit the sleep time to something reasonable.
*/