Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933384AbbFJP43 (ORCPT ); Wed, 10 Jun 2015 11:56:29 -0400 Received: from mail-ig0-f174.google.com ([209.85.213.174]:38322 "EHLO mail-ig0-f174.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S964833AbbFJP4R (ORCPT ); Wed, 10 Jun 2015 11:56:17 -0400 MIME-Version: 1.0 In-Reply-To: <20150610154309.13853.qmail@ns.horizon.com> References: <20150610092553.GA32269@gmail.com> <20150610154309.13853.qmail@ns.horizon.com> Date: Wed, 10 Jun 2015 08:56:16 -0700 Message-ID: Subject: Re: Discussion: quick_pit_calibrate is slow From: Arjan van de Ven To: George Spelvin Cc: Ingo Molnar , Peter Zijlstra , adrian.hunter@intel.com, ak@linux.intel.com, Matt Morton , Arjan van de Ven , Borislav Petkov , "H. Peter Anvin" , LKML , luto@amacapital.net, penberg@iki.fi, Thomas Gleixner , Linus Torvalds Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1518 Lines: 35 > If my plan survives contact with reality, it should work better 100% > of the time and obsolete the old code. > > You said it should fail back to the old code, but there's not a lot of > difference between failures I can detect and failures I can work around. > > I know it's a fatal error to underestimate the perversity of PC hardware > (virtualized hardware even more so) but I'm trying to mitigate that by > really deeply understanding what the current code does and all the error > conditions is can handle. > >> (and RTC if that can be managed.) > btw one thing to think about; if you calibrate VERY quickly, you need to consider spread spectrum clocking. various systems have different clocks on different SSC domains, and while on a bit larger timewindow you can completely ignore SSC, once you go into very short time windows you can't. Now... you can do a quick calibration and then a longer calibration in the background (we do that already after 1 second or so.. but that's 900 msec after userspace finished booting so probably too late if the first calibration is too coarse) also note that normally people kind of expect around 100ppm to not have their clocks deviate too much during the day. (but this can be the result of the longer term calibration) -- 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/