From owner-svn-src-head@FreeBSD.ORG Mon Apr 4 17:00:50 2011 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 82864106564A; Mon, 4 Apr 2011 17:00:50 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 73A5A8FC14; Mon, 4 Apr 2011 17:00:50 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id p34H0oOh089939; Mon, 4 Apr 2011 17:00:50 GMT (envelope-from jkim@svn.freebsd.org) Received: (from jkim@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p34H0oS8089937; Mon, 4 Apr 2011 17:00:50 GMT (envelope-from jkim@svn.freebsd.org) Message-Id: <201104041700.p34H0oS8089937@svn.freebsd.org> From: Jung-uk Kim Date: Mon, 4 Apr 2011 17:00:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r220333 - head/sys/dev/acpica X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 04 Apr 2011 17:00:50 -0000 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); }