Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753022Ab0LUU5p (ORCPT ); Tue, 21 Dec 2010 15:57:45 -0500 Received: from mail-iw0-f174.google.com ([209.85.214.174]:61547 "EHLO mail-iw0-f174.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752299Ab0LUU5n (ORCPT ); Tue, 21 Dec 2010 15:57:43 -0500 DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type; b=vnIQ6GnWe8XF4KCcPqVkkQhJ/yeAxQh1art5F5smSn/O9Ztm89eXr4Qqa+oF/rp4K1 lx/KQVdGPxWL/dh1CokIBOnK6+cMQirJgb7nVZLCm9sIxnjZrAywgJKyRiPrmyJLS8hJ 089zArrXuufwsQ+7oJIUJ61qUaA7Q42U0ONew= MIME-Version: 1.0 In-Reply-To: <20101221075612.GA13626@riccoc20.at.omicron.at> References: <880d82bb8120f73973db27e0c48e949014b1a106.1292512461.git.richard.cochran@omicron.at> <20101221075612.GA13626@riccoc20.at.omicron.at> From: "Kuwahara,T." <6vvetjsrt26xsrzlh1z0zn4d2grdah@gmail.com> Date: Wed, 22 Dec 2010 05:57:02 +0900 Message-ID: Subject: Re: [PATCH V7 1/8] ntp: add ADJ_SETOFFSET mode bit To: Richard Cochran Cc: linux-kernel@vger.kernel.org, linux-api@vger.kernel.org, netdev@vger.kernel.org, Alan Cox , Arnd Bergmann , Christoph Lameter , David Miller , John Stultz , Krzysztof Halasa , Peter Zijlstra , Rodolfo Giometti , Thomas Gleixner 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: 1402 Lines: 44 On Tue, Dec 21, 2010 at 4:56 PM, Richard Cochran wrote: > Can you please elaborate? The timex.constant is defined as equal to the binary logarithm of the reciprocal of the natural frequency minus SHIFT_PLL. In other words, the following equation holds: log2(natural frequency) + time_constant + SHIFT_PLL = 0, which means that decreasing time_constant increases natural frequency exponentially. And since a larger natural frequency gives a smaller settling time, a sufficiently large negative time_constant results in immediate time step, at least in theory. > I don't see any way to use timex.constant with ADJ_OFFSET in order to > correct a time offset. How about this? if (txc->modes & ADJ_OFFSET) { if (txc->constant == INT32_MIN) { /* step time */ } else { /* slew time */ } } > The 'time_constant' in kernel/time/ntp.c is > restricted to the interval [0..MAXTC], and MAXTC is 10 in timex.h. Then let's just ignore the restriction. (It's possible by setting the timex.constant without setting the ADJ_TIMECONST flag.) That said, I'm somehow against the idea of using the adjtimex syscall for that purpose. -- 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/