Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932503AbbFIJQT (ORCPT ); Tue, 9 Jun 2015 05:16:19 -0400 Received: from mga11.intel.com ([192.55.52.93]:32426 "EHLO mga11.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753341AbbFIJQM (ORCPT ); Tue, 9 Jun 2015 05:16:12 -0400 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.13,579,1427785200"; d="scan'208";a="723740288" Message-ID: <5576AE4A.4010802@intel.com> Date: Tue, 09 Jun 2015 12:13:46 +0300 From: Adrian Hunter Organization: Intel Finland Oy, Registered Address: PL 281, 00181 Helsinki, Business Identity Code: 0357606 - 4, Domiciled in Helsinki User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.7.0 MIME-Version: 1.0 To: George Spelvin , tglx@linutronix.de CC: mingo@kernel.org, ak@linux.intel.com, hpa@zytor.com, linux-kernel@vger.kernel.org, luto@amacapital.net Subject: Re: [RFC PATCH] Make quick_pit_calibrate more robust References: <20150609065447.30156.qmail@ns.horizon.com> In-Reply-To: <20150609065447.30156.qmail@ns.horizon.com> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1476 Lines: 41 On 09/06/15 09:54, George Spelvin wrote: > It's fundamentally the same, but more robust to occasional long delays > when accessing the PIT. > > In particular, the old code was susceptible to failing if the initial > PIT read was slow. This revised code will move the timing start if > it's a sufficient improvement. > > Another small change that simplified the code was to give up after the > 55 ms PIT timer wraparound, rather than 50 ms. > > I have a test machine where the old code fails reliably and this > code works. > > I've gone wild with the comments, but I don't think the code is much > more complex. > > Comments solicited. Hi I am not really sure what problem you are trying to solve. I tried this patch on my problem hardware but it failed both with ONE_BYTE_PIT set to 0 and set to 1. I am not sure it addresses the 'really-long-latency to read the counter' problem that I have. A bigger issue for my case is that "slow" calibration is not that slow, taking only 10ms anyway which is much better than the 50ms max for so-called "quick" calibration. So I much prefer the second patch that I posted, which just skips out of quick_pit_calibrate() if the read latency is too long to succeed. Regards Adrian -- 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/