From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756219AbYIDE1s (ORCPT ); Thu, 4 Sep 2008 00:27:48 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1751629AbYIDE1j (ORCPT ); Thu, 4 Sep 2008 00:27:39 -0400 Received: from casper.infradead.org ([85.118.1.10]:52087 "EHLO casper.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751412AbYIDE1i (ORCPT ); Thu, 4 Sep 2008 00:27:38 -0400 Date: Wed, 3 Sep 2008 21:27:29 -0700 From: Arjan van de Ven To: Linus Torvalds Cc: Alok Kataria , Thomas Gleixner , Larry Finger , LKML , "Rafael J. Wysocki" , Michael Buesch , Dan Hecht Subject: Re: [PATCH] Fix TSC calibration issues Message-ID: <20080903212729.436da8d3@infradead.org> In-Reply-To: References: <48BB2116.1060904@lwfinger.net> <1220490884.22734.83.camel@alok-dev1> <20080903201602.2ab6c449@infradead.org> <20080903211029.187d8dab@infradead.org> Organization: Intel X-Mailer: Claws Mail 3.5.0 (GTK+ 2.12.11; i386-redhat-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-SRS-Rewrite: SMTP reverse-path rewritten from by casper.infradead.org See http://www.infradead.org/rpr.html Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, 3 Sep 2008 21:20:23 -0700 (PDT) Linus Torvalds wrote: > > I do agree that we could aim for something like that. But even to get > the rough estimate, we'd probably have to do the 5ms thing. 5msec isn't too big a deal; 250ms otoh ;-) > > > another option for calibrating the tsc rate is to read it from the > > msr's/cpuid/aperf of what the hardware says it should be, and then > > all we need is to verify it is that; that we could do over timer or > > quickly. (of course that only works for systems with constant tsc) > > I don't think it's reliable even for systems with a constant TSC. > Because the msr/cpuid thing isn't going to actualyl give the right > frequency. It might be the frequency the thing is _rated_ at, but it > will be off when people over- or under-clock the front-side bus etc. for 99%+ of the systems it'll be extremely close. We do need to validate it to detect the overclocking etc (and if the calibration says "it smells funny" we can do the slow 250msec thing) -- If you want to reach me at my work email, use arjan@linux.intel.com For development, discussion and tips for power savings, visit http://www.lesswatts.org