From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754269AbYICJL6 (ORCPT ); Wed, 3 Sep 2008 05:11:58 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1751716AbYICJLu (ORCPT ); Wed, 3 Sep 2008 05:11:50 -0400 Received: from www.tglx.de ([62.245.132.106]:58823 "EHLO www.tglx.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751352AbYICJLt (ORCPT ); Wed, 3 Sep 2008 05:11:49 -0400 Date: Wed, 3 Sep 2008 11:11:34 +0200 (CEST) From: Thomas Gleixner To: Linus Torvalds cc: Larry Finger , LKML , "Rafael J. Wysocki" , Alok Kataria , Michael Buesch Subject: Re: [PATCH] Fix TSC calibration issues In-Reply-To: Message-ID: References: <48BB2116.1060904@lwfinger.net> <48BC2A03.9000104@lwfinger.net> 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 Tue, 2 Sep 2008, Linus Torvalds wrote: > This is "wrongish". > > You really should do the > > tsc1 = tsc_read_refs(&pm1, hpet ? &hpet1 : NULL); > ... > tsc2 = tsc_read_refs(&pm2, hpet ? &hpet2 : NULL); > > around the whole loop, because they get more exact with more time inside, > and they don't improve from looping around. True. Just kept them at the place where my debug patches had left them. > Also, that code is already _too_ unreadable. How about starting by just > moving the PIT calibration into a function of its own, like the appended > patch. And then as a separate patch, improving the heuristics for just the > PIT calibration. Yeah, should have done that. But I was too tired to touch anything in the code more complex than adding a few comments. Thanks, tglx