Re: [PATCH V7 1/8] ntp: add ADJ_SETOFFSET mode bit

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: john stultz
Date: Wednesday, December 22, 2010 - 5:00 pm

On Thu, 2010-12-23 at 05:27 +0900, Kuwahara,T. wrote:

Sure, I get that a instantaneous offset adjustment could be represented
as a instantaneous slew of the same amount. But what is the benefit of
doing this? The ADJ_OFFSET isn't really a continuous function like you
describe. For instance, you can't slew time backwards. The amount you
can slow or speed up the clock is limited, so time will always increase.
So to have a magic value way outside the bound of normal operation that
does something special seems a bit obfuscated.

ADJ_SETOFFSET isn't slewing the clock. So I think its much clearer to
add a new mode, rather then to try to wedge the functionality into a
corner case of ADJ_OFFSET slewing just because one could mathematically
represent it the same way.

I see the cost of adding it as a special case as adding extra complexity
to an already complex subsystem. Doing things that make the code easier
to understand and read makes it more maintainable. And I don't see the
gain (other then saving a bit in the bit flag) to offset the complexity
of trying to squeeze this functionality into the ADJ_OFFSET mode.

thanks
-john


--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[PATCH V7 0/8] ptp: IEEE 1588 hardware clock support, Richard Cochran, (Thu Dec 16, 8:41 am)
[PATCH V7 1/8] ntp: add ADJ_SETOFFSET mode bit, Richard Cochran, (Thu Dec 16, 8:41 am)
[PATCH V7 3/8] posix clocks: introduce dynamic clocks, Richard Cochran, (Thu Dec 16, 8:43 am)
[PATCH V7 7/8] ptp: Added a clock driver for the IXP46x., Richard Cochran, (Thu Dec 16, 8:44 am)
Re: [PATCH V7 3/8] posix clocks: introduce dynamic clocks, Arnd Bergmann, (Thu Dec 16, 9:16 am)
Re: [PATCH V7 1/8] ntp: add ADJ_SETOFFSET mode bit, Thomas Gleixner, (Thu Dec 16, 10:48 am)
Re: [PATCH V7 3/8] posix clocks: introduce dynamic clocks, Thomas Gleixner, (Thu Dec 16, 1:56 pm)
Re: [PATCH V7 3/8] posix clocks: introduce dynamic clocks, Richard Cochran, (Thu Dec 16, 11:29 pm)
Re: [PATCH V7 4/8] posix clocks: hook dynamic clocks into ..., Richard Cochran, (Fri Dec 17, 12:04 am)
Re: [PATCH V7 1/8] ntp: add ADJ_SETOFFSET mode bit, Kuwahara,T., (Fri Dec 17, 1:16 pm)
Re: [PATCH V7 1/8] ntp: add ADJ_SETOFFSET mode bit, john stultz, (Tue Dec 21, 12:37 pm)
Re: [PATCH V7 1/8] ntp: add ADJ_SETOFFSET mode bit, Kuwahara,T., (Tue Dec 21, 1:57 pm)
Re: [PATCH V7 1/8] ntp: add ADJ_SETOFFSET mode bit, Kuwahara,T., (Tue Dec 21, 2:13 pm)
Re: [PATCH V7 1/8] ntp: add ADJ_SETOFFSET mode bit, Richard Cochran, (Wed Dec 22, 12:11 am)
Re: [PATCH V7 1/8] ntp: add ADJ_SETOFFSET mode bit, Richard Cochran, (Wed Dec 22, 12:13 am)
Re: [PATCH V7 1/8] ntp: add ADJ_SETOFFSET mode bit, Alexander Gordeev, (Wed Dec 22, 2:58 am)
Re: [PATCH V7 1/8] ntp: add ADJ_SETOFFSET mode bit, Kuwahara,T., (Wed Dec 22, 1:27 pm)
Re: [PATCH V7 1/8] ntp: add ADJ_SETOFFSET mode bit, john stultz, (Wed Dec 22, 5:00 pm)
Re: [PATCH V7 1/8] ntp: add ADJ_SETOFFSET mode bit, Richard Cochran, (Wed Dec 22, 11:13 pm)
Re: [PATCH V7 1/8] ntp: add ADJ_SETOFFSET mode bit, Kuwahara,T., (Sat Dec 25, 1:38 pm)
Re: [PATCH V7 7/8] ptp: Added a clock driver for the IXP46x., Richard Cochran, (Mon Jan 3, 10:07 am)