From owner-freebsd-current@FreeBSD.ORG Sun Oct 30 23:19:45 2005 Return-Path: X-Original-To: freebsd-current@FreeBSD.org Delivered-To: freebsd-current@FreeBSD.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 1B9FB16A41F; Sun, 30 Oct 2005 23:19:45 +0000 (GMT) (envelope-from imp@bsdimp.com) Received: from harmony.bsdimp.com (vc4-2-0-87.dsl.netrack.net [199.45.160.85]) by mx1.FreeBSD.org (Postfix) with ESMTP id AB66943D45; Sun, 30 Oct 2005 23:19:44 +0000 (GMT) (envelope-from imp@bsdimp.com) Received: from localhost (localhost.village.org [127.0.0.1] (may be forged)) by harmony.bsdimp.com (8.13.3/8.13.3) with ESMTP id j9UNG0Bq092535; Sun, 30 Oct 2005 16:16:00 -0700 (MST) (envelope-from imp@bsdimp.com) Date: Sun, 30 Oct 2005 16:16:06 -0700 (MST) Message-Id: <20051030.161606.65680605.imp@bsdimp.com> To: gurney_j@resnet.uoregon.edu From: "M. Warner Losh" In-Reply-To: <20051030195936.GZ4115@funkthat.com> References: <20051030093718.GE39253@dragon.NUXI.org> <4364D90F.3090205@samsco.org> <20051030195936.GZ4115@funkthat.com> X-Mailer: Mew version 3.3 on Emacs 21.3 / Mule 5.0 (SAKAKI) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-2.0 (harmony.bsdimp.com [127.0.0.1]); Sun, 30 Oct 2005 16:16:09 -0700 (MST) Cc: Alexander@Leidinger.net, freebsd-current@FreeBSD.org, davidxu@FreeBSD.org Subject: Re: TSC instead of ACPI: powerd doesn't work anymore (to be expected?) X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 30 Oct 2005 23:19:45 -0000 In message: <20051030195936.GZ4115@funkthat.com> John-Mark Gurney writes: : Scott Long wrote this message on Sun, Oct 30, 2005 at 07:30 -0700: : > >Correct, but why is it felt the latency of the ACPI timer is an issue? : > >Of course we all want things to as fast as possible, but is that just an : > >abstract desire, or a real issue was run into? : > > : > : > ACPI-fast requires an ioport read which takes about 1us (according to : > Google). Do that 1000 times a second and you have each CPU spending : > 1% of its time doing nothing but reading the clock. Yikes. : : Math correction: .1%... 1us * 1000 = 1ms, 1ms = .001s, .001 * 100% = .1% Actually, ioport reads can be faster than the 1us that's widely quoted. ioport reads can be as fast as ~125ns (2 cycles at 16MHz). However, experience has shown that they are rarely this fast. I've seen 8MB/s pio over the pci bus on some custom hardware we have, which 2Mreads/sec which is about 500ns per read. I think that the pci hardware that I was reading had a few extra wait states... The 1us/read is for devices on the ISA bus or for hardware that emulates this timing. Warner