From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756748AbYIDVff (ORCPT ); Thu, 4 Sep 2008 17:35:35 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1754161AbYIDVf1 (ORCPT ); Thu, 4 Sep 2008 17:35:27 -0400 Received: from smtp1.linux-foundation.org ([140.211.169.13]:45435 "EHLO smtp1.linux-foundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754062AbYIDVf0 (ORCPT ); Thu, 4 Sep 2008 17:35:26 -0400 Date: Thu, 4 Sep 2008 14:34:55 -0700 (PDT) From: Linus Torvalds To: Ingo Molnar cc: Alan Cox , Thomas Gleixner , LKML , Alok Kataria , Arjan van de Veen , "H. Peter Anvin" , Peter Zijlstra Subject: Re: [RFC patch 0/4] TSC calibration improvements In-Reply-To: Message-ID: References: <20080904160036.GA18382@elte.hu> <20080904190728.59634020@lxorguk.ukuu.org.uk> <20080904204305.GA29065@elte.hu> <20080904205236.GA3864@elte.hu> <20080904212130.GA12406@elte.hu> User-Agent: Alpine 1.10 (LFD 962 2008-03-14) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, 4 Sep 2008, Linus Torvalds wrote: > > Face it, if somebody tries to make QUICK_PIT_MS be so large as to that be > an issue, then the whole point of the function goes away. Btw, the same is true of adding any random "sanity checking". The point of that thing was to simply only work when the PIT works as advertized, and fail immediately if it doesn't. Even *if* you were to pick a big calibration delay *and* if you happened to have a PIT that is broken and doesn't wrap correctly, the design of the thing would mean that it would then fail the calibration already. Exactly because it would _see_ that it's not wrapping. So then it returns zero, and the slow and complicated case can run. Take a look at the generated assembly language. I literally wrote it so that you could imagine that it's an old-time asm hacker that wrote the asm. Don't screw it up. Linus