From owner-freebsd-stable@FreeBSD.ORG Sat Jul 23 08:47:45 2011 Return-Path: Delivered-To: freebsd-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6D4BF1065672 for ; Sat, 23 Jul 2011 08:47:45 +0000 (UTC) (envelope-from jdc@koitsu.dyndns.org) Received: from qmta04.emeryville.ca.mail.comcast.net (qmta04.emeryville.ca.mail.comcast.net [76.96.30.40]) by mx1.freebsd.org (Postfix) with ESMTP id 51DE38FC12 for ; Sat, 23 Jul 2011 08:47:45 +0000 (UTC) Received: from omta14.emeryville.ca.mail.comcast.net ([76.96.30.60]) by qmta04.emeryville.ca.mail.comcast.net with comcast id BLmW1h0021HpZEsA4LnL8o; Sat, 23 Jul 2011 08:47:20 +0000 Received: from koitsu.dyndns.org ([67.180.84.87]) by omta14.emeryville.ca.mail.comcast.net with comcast id BLnP1h0011t3BNj8aLnPRf; Sat, 23 Jul 2011 08:47:24 +0000 Received: by icarus.home.lan (Postfix, from userid 1000) id 5BA78102C36; Sat, 23 Jul 2011 01:47:21 -0700 (PDT) Date: Sat, 23 Jul 2011 01:47:21 -0700 From: Jeremy Chadwick To: Callum Gibson Message-ID: <20110723084721.GA7931@icarus.home.lan> References: <20110719112033.GA51765@omma.gibson.athome> <20110721205600.GA52261@omma.gibson.athome> <20110721214310.GA74656@icarus.home.lan> <201107220816.52901.jhb@freebsd.org> <20110723081304.GA14172@omma.gibson.athome> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20110723081304.GA14172@omma.gibson.athome> User-Agent: Mutt/1.5.21 (2010-09-15) Cc: Attilio Rao , freebsd-amd64@freebsd.org, freebsd-stable@freebsd.org, Jung-uk Kim , John Baldwin Subject: Re: powernow regression in 8-STABLE X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 23 Jul 2011 08:47:45 -0000 On Sat, Jul 23, 2011 at 06:13:04PM +1000, Callum Gibson wrote: > On 22Jul11 08:16, John Baldwin wrote: > }The problem is that we calibrate the TSC using this algorithm: > } > } - grab the TSC > } - spin on the ISA timer waiting for it to run for a second > } - grab the TSC > } > }The issue is that the SMI# fires at the same time we want to be execuiting > }step 3, and step 3 is deferred while the SMI# handler runs. As a result, the > }TSC delta ends up being "1 second + time of an SMI# to poll USB". We have a > }hack fix for this at work that originally came from Attilio Rao. This is a > }patch for it relative to 8. It disables interrupt generation for the ISA > }timer while we calibrate the TSC (which disables the SMI# temporarily): > > Thanks, John. The hack works as intended, but I guess it's not a "real" > solution which is why you haven't committed it? This sort of thing is going to have to get dealt with officially sooner or later, hack-fix or elegant solution either way[1]. More and more systems are using native USB keyboards, and most system BIOSes I've seen (from multiple vendors, specifically Supermicro, Lenovo, Asus, Dell, HP, and Gigabyte[2]) are defaulting to having these options enabled (and rightfully so). If the hack-fix has repercussions, it would be helpful to know what those are or how those might manifest themselves. Otherwise, has anyone taken a look at how Linux addresses this problem? To my knowledge GRUB and similar bootstraps do not have a native USB stack, so I'm left wondering how they deal with this. [1]: I'm in no way saying "Hey! Fix this! {contributes nothing}", I'm simply pointing out that we're at a point where we really don't have much of a choice. The more I read technical explanations from John the more hate x86 architecture. ;-) [2]: On a couple Gigabyte boards I have the default values for said option is enabled (for both keyboard and mouse). -- | Jeremy Chadwick jdc at parodius.com | | Parodius Networking http://www.parodius.com/ | | UNIX Systems Administrator Mountain View, CA, US | | Making life hard for others since 1977. PGP 4BD6C0CB |