Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933637AbbFJJM2 (ORCPT ); Wed, 10 Jun 2015 05:12:28 -0400 Received: from mail-wi0-f174.google.com ([209.85.212.174]:37676 "EHLO mail-wi0-f174.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933113AbbFJJMU (ORCPT ); Wed, 10 Jun 2015 05:12:20 -0400 Date: Wed, 10 Jun 2015 11:12:15 +0200 From: Ingo Molnar To: Adrian Hunter Cc: George Spelvin , tglx@linutronix.de, ak@linux.intel.com, hpa@zytor.com, linux-kernel@vger.kernel.org, luto@amacapital.net, torvalds@linux-foundation.org Subject: Re: Discussion: quick_pit_calibrate is slow Message-ID: <20150610091215.GA30332@gmail.com> References: <20150610070842.4980.qmail@ns.horizon.com> <5577F193.70702@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <5577F193.70702@intel.com> User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1010 Lines: 28 * Adrian Hunter wrote: > On 10/06/15 10:08, George Spelvin wrote: > > > The 8254 timer latches the msbyte when the lsbyte is read and returns the > > latched value on the next read > > Are you sure about? The docs I've read don't seem to say that. Btw., even if docs claim that, the code should gracefully handle the case where that's not the case or where there's an occasional quirk in the numbers. Because real OSs mostly only care about the interrupts generated by the PIT. That we can read the count is just a bonus that might or might not work reliably, depending on the hardware. Especially any 'measure the minimum time' approach measuring more than a single PIT tick would be senstive to false positives. Thanks, Ingo -- 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/