Skip to content

Commit

Permalink
executer/exsystem: Warn about sleeps greater than 10 ms
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
paulmenzel committed Mar 16, 2022
1 parent 05ba545 commit 2a0d1d4
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions source/components/executer/exsystem.c
Expand Up @@ -338,6 +338,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.
Expand Down

0 comments on commit 2a0d1d4

Please sign in to comment.