Skip to content

Commit

Permalink
ACPICA: executer/exsystem: Warn about sleeps greater than 10 ms
Browse files Browse the repository at this point in the history
ACPICA commit 2a0d1d475e7ea1c815bee1e0692d81db9a7c909c

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.

Link: https://github.com/acpica/acpica/commit/2a0d1d47
Signed-off-by: Bob Moore <robert.moore@intel.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Reported-by: kernel test robot <lkp@intel.com>
  • Loading branch information
pmenzel authored and Rafael J. Wysocki committed Apr 13, 2022
1 parent ace8f1c commit 6eaf087
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions drivers/acpi/acpica/exsystem.c
Original file line number Diff line number Diff line change
Expand Up @@ -169,6 +169,16 @@ acpi_status acpi_ex_system_do_sleep(u64 how_long_ms)

acpi_ex_exit_interpreter();

/*
* Warn users about excessive sleep times, so ASL code can be improved to
* use polling or similar techniques.
*/
if (how_long_ms > 10) {
ACPI_WARNING((AE_INFO,
"Firmware issue: Excessive sleep time (%llu ms > 10 ms) in ACPI Control Method",
how_long_us));
}

/*
* 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 6eaf087

Please sign in to comment.