From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755403AbcAHOGj (ORCPT ); Fri, 8 Jan 2016 09:06:39 -0500 Received: from www.linutronix.de ([62.245.132.108]:38043 "EHLO Galois.linutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755347AbcAHOFf (ORCPT ); Fri, 8 Jan 2016 09:05:35 -0500 Date: Fri, 8 Jan 2016 15:04:28 +0100 (CET) From: Thomas Gleixner To: Christopher Hall cc: John Stultz , Richard Cochran , Ingo Molnar , "H. Peter Anvin" , Jeff Kirsher , "x86@kernel.org" , lkml , intel-wired-lan@lists.osuosl.org, netdev@vger.kernel.org, "Stanton, Kevin B" Subject: Re: [RFC v5 3/6] Add history to cross timestamp interface supporting slower devices In-Reply-To: Message-ID: References: <1451911523-8534-1-git-send-email-christopher.s.hall@intel.com> <1451911523-8534-4-git-send-email-christopher.s.hall@intel.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,URIBL_BLOCKED=0.001 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, 7 Jan 2016, Christopher Hall wrote: > On Wed, 06 Jan 2016 11:37:23 -0800, John Stultz > wrote: > > I've not done a super close reading here. But is it very likely the > > the history_ref->cs_seq is the same as the captured seq? I thought > > this history_ref was to allow old cross stamps to be used to improve > > the back-calculation of the time at the given cycle value. So throwing > > them out if they are older then the last tick seems strange. > > Maybe this needs more explanation. The clocksource sequence (cs_seq) is > incremented for each change in clocksource. I use this to detect a rare corner > case where the clocksource is changed from (on x86 anyway) TSC and then back. > If the history crosses one of these changes then interpolation shouldn't be > attempted (return error). It's not really enough when using the history to > just check that the current clocksource is equal to the one used at the start > of the history. The clocksource must not have changed at all. To answer your > question, it's not at all likely that this would occur. You can flush the history when a clocksource change happens. No need to add extra data to the core structures. Thanks, tglx