Date: Mon, 4 Apr 2011 17:00:50 +0000 (UTC) From: Jung-uk Kim <jkim@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r220333 - head/sys/dev/acpica Message-ID: <201104041700.p34H0oS8089937@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
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); }
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201104041700.p34H0oS8089937>