Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757182AbYAYOJG (ORCPT ); Fri, 25 Jan 2008 09:09:06 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1752397AbYAYOIy (ORCPT ); Fri, 25 Jan 2008 09:08:54 -0500 Received: from scrub.xs4all.nl ([194.109.195.176]:4572 "EHLO scrub.xs4all.nl" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751987AbYAYOIx (ORCPT ); Fri, 25 Jan 2008 09:08:53 -0500 Date: Fri, 25 Jan 2008 15:07:14 +0100 (CET) From: Roman Zippel X-X-Sender: roman@scrub.home To: john stultz cc: lkml , Andrew Morton , Ingo Molnar , Steven Rostedt Subject: Re: [PATCH] correct inconsistent ntp interval/tick_length usage In-Reply-To: <1201142334.6383.40.camel@localhost.localdomain> Message-ID: References: <1201142334.6383.40.camel@localhost.localdomain> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1121 Lines: 29 Hi, On Wed, 23 Jan 2008, john stultz wrote: > This difference in calculation was causing the clocksource correction > code to apply a correction factor to the clocksource so the two > intervals were the same, however this results in the actual frequency of > the clocksource to be made incorrect. I believe this difference would > affect all clocksources, although to differing degrees depending on the > clocksource resolution. Let's look at why the correction is done in first place. The update steps don't add up precisely to 1sec (LATCH*HZ != CLOCK_TICK_RATE), so a small addjustment is used to make up for it. The problem here is that if the update frequency changes, the addjustment isn't correct anymore. The simple fix is to just omit the addjustment in these cases in ntp.c: #if NTP_INTERVAL_FREQ == HZ ... #else #define CLOCK_TICK_ADJUST 0 #endif bye, Roman -- 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/