svn commit: r220333 - head/sys/dev/acpica
Jung-uk Kim
jkim at FreeBSD.org
Mon Apr 4 17:00:50 UTC 2011
Author: jkim
Date: Mon Apr 4 17:00:50 2011
New Revision: 220333
URL: http://svn.freebsd.org/changeset/base/220333
Log:
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.
Modified:
head/sys/dev/acpica/acpi_timer.c
Modified: head/sys/dev/acpica/acpi_timer.c
==============================================================================
--- head/sys/dev/acpica/acpi_timer.c Mon Apr 4 16:59:46 2011 (r220332)
+++ head/sys/dev/acpica/acpi_timer.c Mon Apr 4 17:00:50 2011 (r220333)
@@ -327,14 +327,15 @@ acpi_timer_test()
}
intr_restore(s);
- if (max - min > 2)
+ delta = max - min;
+ if (delta > 2 && vm_guest == VM_GUEST_NO)
n = 0;
else if (min < 0 || max == 0)
n = 0;
else
n = 1;
if (bootverbose)
- printf(" %d/%d", n, max-min);
+ printf(" %d/%d", n, delta);
return (n);
}
More information about the svn-src-all
mailing list