Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756115AbbFCQrq (ORCPT ); Wed, 3 Jun 2015 12:47:46 -0400 Received: from www.linutronix.de ([62.245.132.108]:56598 "EHLO Galois.linutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753315AbbFCQrh (ORCPT ); Wed, 3 Jun 2015 12:47:37 -0400 Date: Wed, 3 Jun 2015 18:47:37 +0200 (CEST) From: Thomas Gleixner To: Linus Torvalds cc: Ingo Molnar , Adrian Hunter , LKML , Andy Lutomirski , Andi Kleen , the arch/x86 maintainers , "H. Peter Anvin" , Len Brown Subject: Re: [PATCH RFC] x86, tsc: Allow for high latency in quick_pit_calibrate() In-Reply-To: Message-ID: References: <1432194944-29087-1-git-send-email-adrian.hunter@intel.com> <20150603062054.GA23303@gmail.com> User-Agent: Alpine 2.11 (DEB 23 2013-08-11) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Linutronix-Spam-Score: -1.0 X-Linutronix-Spam-Level: - X-Linutronix-Spam-Status: No , -1.0 points, 5.0 required, ALL_TRUSTED=-1,SHORTCIRCUIT=-0.0001 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2198 Lines: 55 On Wed, 3 Jun 2015, Linus Torvalds wrote: > On Tue, Jun 2, 2015 at 11:20 PM, Ingo Molnar wrote: > > Given that Windows relies on the > > HPET for timekeeping, it might get more attention than the PIT? > > Does Windows actually do that? Becuase if so, that's just about the > strongest argument for HPET there is - it's likely to work, and the > frequency is likely to be correct. At least it used to. Not sure if it still does. > We've had issues with HPET, but for calibration it might very well be > the right thing to do. Right. The issues we had were on the clock events side caused by the match register delayed writes. I've never seen a bug report about the frequency being completely wrong, except for crap values which we filter out. Though, HPET period can be off by more than 500ppm, but I don't think that matters anymore for timekeeping as we switch to TSC only after the long term calibration. The quick calibration is just for getting the TSC frequency roughly correct for udelay. > Does anybody know what the base oscillator for HPET tends to be? Also, The most common frequency is 14.318180 MHz. > some googling shows a vmware paper that is not that impressed with the > HPET. Yeah, they complain about period being off by 600ppm and therefor being useless for timekeeping, but that's not what we want to use it for. > The good thing about the PIT is that it's just *specified* to be > driven off a real crystal running at a very fixed frequency. There's > no gray areas there. Sure, virtualization can screw it up (but will > likely screw up other higher-resolution clocks even more), and hw > designers can cause problems, but it's been pretty reliable. The other known frequency clock is pmtimer. We use hpet and pmtimer in the slow calibration fallback already. > (Yeah, the CMOS RTC clock should be too, as George Spelvin points out. > That might be worth looking at too). Indeed. Thanks, tglx -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/