Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S261916AbVAYM3v (ORCPT ); Tue, 25 Jan 2005 07:29:51 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S261917AbVAYM3v (ORCPT ); Tue, 25 Jan 2005 07:29:51 -0500 Received: from gockel.physik3.uni-rostock.de ([139.30.44.16]:34770 "EHLO gockel.physik3.uni-rostock.de") by vger.kernel.org with ESMTP id S261916AbVAYM3t (ORCPT ); Tue, 25 Jan 2005 07:29:49 -0500 Date: Tue, 25 Jan 2005 13:25:15 +0100 (CET) From: Tim Schmielau To: Christoph Lameter cc: john stultz , lkml , George Anzinger , albert@users.sourceforge.net, Ulrich Windl , Dominik Brodowski , David Mosberger , Andi Kleen , paulus@samba.org, schwidefsky@de.ibm.com, keith maanthey , Patricia Gaughen , Chris McDermott , Max Asbock , mahuja@us.ibm.com, Nishanth Aravamudan , Darren Hart , "Darrick J. Wong" , Anton Blanchard Subject: Re: [RFC][PATCH] new timeofday core subsystem (v. A2) In-Reply-To: Message-ID: References: <1106607089.30884.10.camel@cog.beaverton.ibm.com> <1106611416.30884.22.camel@cog.beaverton.ibm.com> <1106613222.30884.34.camel@cog.beaverton.ibm.com> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1190 Lines: 30 > Monotonic clocks could be calculated > > monotime = ns_at_last_tick + (time_source_cycles_since_tick * > current_scaling_factor) >> shift_factor. > > This would also be easy to implement in asm if necessary. > > tick processing could then increment or decrement the current scaling > factor to minimize the error between ticks. It could also add > nanoseconds to ns_at_last_tick to correct the clock forward. I'd think that adding nanoseconds to ns_at_last_tick is not a good idea. It might minimize the error shortly after the tick, but not the total error average over the whole tick period. And it introduces clock jumps. Tiny, but unnecessary. Just as you say, > With the appropiate shift_factor one should be able to fine tune time much > more accurately than ntp_scale would do. Over time the necessary > corrections could be minimized to just adding a few ns once in a while. finetuning the scaling factor should be enough. Tim - 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/