kernel/acpi_timer: Lower the bar for ACPI-fast on real and virtual machines.
authorSascha Wildner <saw@online.de>
Sun, 3 Aug 2014 02:27:51 +0000 (04:27 +0200)
committerSascha Wildner <saw@online.de>
Sun, 3 Aug 2014 02:27:51 +0000 (04:27 +0200)
commita6874b57cad295218fc2f87145b54bf48c4ab076
treea66a1f912bc1a672ef814082c07f5dd61e15bfdb
parent4520cefcef52ac2e5f26e70fcef4be1111290d27
kernel/acpi_timer: Lower the bar for ACPI-fast on real and virtual machines.

This brings in FreeBSD's revisions 220331-220369:

r220369 | jkim | 2011-04-05 20:40:19 +0200 (Tue, 05 Apr 2011) | 6 lines

Lower the bar for ACPI-fast on real machines slightly.  Empirical evidences
show that there are perfectly working PM timers with occasional "hiccups",
probably because of an SMI.  Now we ignore the maximum if it happens once in
the test loop and the width is small enough.  Also, relax normal width a bit
to count in a boundary case.

------------------------------------------------------------------------
r220336 | jkim | 2011-04-04 19:44:26 +0200 (Mon, 04 Apr 2011) | 3 lines

Always check the current minimum value to make the test more predictable.
Use INT32_MAX instead of an arbitrary big number for the initial minimum.

------------------------------------------------------------------------
r220333 | jkim | 2011-04-04 19:00:50 +0200 (Mon, 04 Apr 2011) | 5 lines

Lower the bar for ACPI-fast on virtual machines.  The current logic depends
on the fact that real hardware has almost fixed cost to read the ACPI timer.
It is virtually always false for hardware emulation and it makes no sense to
read it multiple times, which is already quite expensive for full emulation.

------------------------------------------------------------------------
r220331 | jkim | 2011-04-04 18:47:42 +0200 (Mon, 04 Apr 2011) | 2 lines

Add inline to acpi_timer_read() to reduce unnecessary jumps and calls.
sys/dev/acpica/acpi_timer.c