From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S261409AbULHXsq (ORCPT ); Wed, 8 Dec 2004 18:48:46 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S261410AbULHXsp (ORCPT ); Wed, 8 Dec 2004 18:48:45 -0500 Received: from omx2-ext.sgi.com ([192.48.171.19]:46274 "EHLO omx2.sgi.com") by vger.kernel.org with ESMTP id S261409AbULHXsg (ORCPT ); Wed, 8 Dec 2004 18:48:36 -0500 Date: Wed, 8 Dec 2004 15:47:21 -0800 (PST) From: Christoph Lameter X-X-Sender: clameter@schroedinger.engr.sgi.com To: George Anzinger cc: john stultz , lkml , tim@physik3.uni-rostock.de, albert@users.sourceforge.net, Ulrich.Windl@rz.uni-regensburg.de, Len Brown , linux@dominikbrodowski.de, David Mosberger , Andi Kleen , paulus@samba.org, schwidefsky@de.ibm.com, keith maanthey , greg kh , Patricia Gaughen , Chris McDermott , Max , mahuja@us.ibm.com Subject: Re: [RFC] New timeofday proposal (v.A1) In-Reply-To: <41B77134.90804@mvista.com> Message-ID: References: <1102470914.1281.27.camel@cog.beaverton.ibm.com> <1102533066.1281.81.camel@cog.beaverton.ibm.com> <1102535891.1281.148.camel@cog.beaverton.ibm.com> <41B77134.90804@mvista.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 On Wed, 8 Dec 2004, George Anzinger wrote: > Right. We seem to be doing ok now by just adjusting things at tick time and > using the "normal" interpolation between ticks. > > As for the math, the current code keeps a running "remainder" which is the > amount of the correction that was finer than the clock resolution (i.e. less > than a nano second) and rolls this in on the next tick. This gives resolution > out to several bits to the right of the nano second. And I think this is all > done with 32 bit math (if memory serves). That is probably the i386 version with which I am not familiar. The time interpolator logic (IA64 and SPARC64) does fine with a scaled 64 bit factor without a remainder. The factor may be used to express fractions of nanoseconds.