21 Jul, 2007

1 commit

  • Remove time_interpolator code (This is generic code, but
    only user was ia64. It has been superseded by the
    CONFIG_GENERIC_TIME code).

    Signed-off-by: Bob Picco
    Signed-off-by: John Stultz
    Signed-off-by: Peter Keilty
    Signed-off-by: Tony Luck

    Bob Picco
     

17 Feb, 2007

1 commit

  • Distangle the NTP update from HZ. This is necessary for dynamic tick enabled
    kernels.

    Cc: Thomas Gleixner
    Cc: Ingo Molnar
    Cc: john stultz
    Cc: Roman Zippel
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    john stultz
     

12 Feb, 2007

1 commit

  • The 32bit and 64bit PARISC Linux kernels suffers from the problem, that the
    gettimeofday() call sometimes returns non-monotonic times.

    The easiest way to fix this, is to drop the PARISC-specific implementation
    and switch over to the generic TIME_INTERPOLATION framework.

    But in order to make it even compile on 32bit PARISC, the patch below which
    touches the generic Linux code, is mandatory.

    More information and the full patch with the parisc-specific changes is included in this thread: http://lists.parisc-linux.org/pipermail/parisc-linux/2006-December/031003.html

    As far as I could see, this patch does not change anything for the existing
    architectures which use this framework (IA64 and SPARC64), since "cycles_t"
    is defined there as unsigned 64bit-integer anyway (which then makes this
    patch a no-change for them).

    Signed-off-by: Helge Deller
    Cc:
    Cc: Thomas Gleixner
    Cc: Ingo Molnar
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Helge Deller
     

06 Oct, 2006

1 commit


01 Oct, 2006

9 commits

  • This patch contains the following possible cleanups:
    - make the following needlessly global function static:
    - ntp_update_frequency()
    - make the following needlessly global variables static:
    - time_state
    - time_offset
    - time_constant
    - time_reftime
    - remove the following read-only global variable:
    - time_precision

    Signed-off-by: Adrian Bunk
    Cc: Roman Zippel
    Cc: john stultz
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Adrian Bunk
     
  • Remove a few unused defines and remove obsolete information from comments.

    Signed-off-by: Roman Zippel
    Cc: john stultz
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Roman Zippel
     
  • This converts the kernel ntp model into a model which matches the nanokernel
    reference implementations. The previous patches already increased the
    resolution and precision of the computations, so that this conversion becomes
    quite simple.

    explains:

    The original NTP kernel interface was defined in units of microseconds.
    That's what Linux implements. As computers have gotten faster and can now
    split microseconds easily, a new kernel interface using nanosecond units was
    defined ("the nanokernel", confusing as that name is to OS hackers), and
    there's an STA_NANO bit in the adjtimex() status field to tell the application
    which units it's using.

    The current ntpd supports both, but Linux loses some possible timing
    resolution because of quantization effects, and the ntpd hackers would really
    like to be able to drop the backwards compatibility code.

    Ulrich Windl has been maintaining a patch set to do the conversion for years,
    but it's hard to keep in sync.

    Signed-off-by: Roman Zippel
    Cc: john stultz
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Roman Zippel
     
  • This converts time_freq to a scaled nsec value and adds around 6bit of extra
    resolution. This pushes the time_freq to its 32bit limits so the calculatons
    have to be done with 64bit.

    Signed-off-by: Roman Zippel
    Cc: john stultz
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Roman Zippel
     
  • time_tolerance isn't changed at all in the kernel, so simply remove it, this
    simplifies the next patch, as it avoids a number of conversions.

    Signed-off-by: Roman Zippel
    Cc: john stultz
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Roman Zippel
     
  • This folds update_ntp_one_tick() into second_overflow() and adds time_adjust
    to the tick length, this makes time_next_adjust unnecessary. This slightly
    changes the adjtime() behaviour, instead of applying it to the next tick, it's
    applied to the next second.

    Signed-off-by: Roman Zippel
    Cc: john stultz
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Roman Zippel
     
  • This converts time_offset into a scaled per tick value. This avoids now
    completely the crude compensation in second_overflow().

    Signed-off-by: Roman Zippel
    Cc: john stultz
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Roman Zippel
     
  • This introduces ntp_update_frequency() and deinlines ntp_clear() (as it's not
    performance critical). ntp_update_frequency() calculates the base tick length
    using tick_usec and adds a base adjustment, in case the frequency doesn't
    divide evenly by HZ.

    Signed-off-by: Roman Zippel
    Cc: john stultz
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Roman Zippel
     
  • Move all the NTP related code to ntp.c

    [akpm@osdl.org: cleanups, build fix]
    Signed-off-by: John Stultz
    Cc: Ingo Molnar
    Cc: Roman Zippel
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    john stultz
     

13 Sep, 2006

1 commit

  • There's useful stuff in but has nothing for
    userspace. Stop exporting it, and include it only from within the existing
    #ifdef __KERNEL__ part of

    This fixes a 'make headers_check' failure on i386 because asm-i386/timex.h
    includes both asm-i386/tsc.h and asm-i386/processor.h, neither of which are
    exported to userspace. It's not entirely clear _why_ it includes either of
    these, but it does.

    Signed-off-by: David Woodhouse
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    David Woodhouse
     

27 Jun, 2006

2 commits

  • This fixes the clock source updates in update_wall_time() to correctly
    track the time coming in via current_tick_length(). Optimize the fast
    paths to be as short as possible to keep the overhead low.

    Signed-off-by: Roman Zippel
    Acked-by: John Stultz
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Roman Zippel
     
  • Change the current_tick_length() function so it takes an argument which
    specifies how much precision to return in shifted nanoseconds. This provides
    a simple way to convert between NTPs internal nanoseconds shifted by
    (SHIFT_SCALE - 10) to other shifted nanosecond units that are used by the
    clocksource abstraction.

    Signed-off-by: John Stultz
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    john stultz
     

26 Apr, 2006

1 commit


27 Mar, 2006

1 commit


26 Mar, 2006

1 commit

  • This removes the support for pps. It's completely unused within the kernel
    and is basically in the way for further cleanups. It should be easier to
    readd proper support for it after the rest has been converted to NTP4
    (where the pps mechanisms are quite different from NTP3 anyway).

    Signed-off-by: Roman Zippel
    Cc: Adrian Bunk
    Cc: john stultz
    Cc: Thomas Gleixner
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Roman Zippel
     

18 Feb, 2006

1 commit

  • This provides an interface for arch code to find out how many
    nanoseconds are going to be added on to xtime by the next call to
    do_timer. The value returned is a fixed-point number in 52.12 format
    in nanoseconds. The reason for this format is that it gives the
    full precision that the timekeeping code is using internally.

    The motivation for this is to fix a problem that has arisen on 32-bit
    powerpc in that the value returned by do_gettimeofday drifts apart
    from xtime if NTP is being used. PowerPC is now using a lockless
    do_gettimeofday based on reading the timebase register and performing
    some simple arithmetic. (This method of getting the time is also
    exported to userspace via the VDSO.) However, the factor and offset
    it uses were calculated based on the nominal tick length and weren't
    being adjusted when NTP varied the tick length.

    Note that 64-bit powerpc has had the lockless do_gettimeofday for a
    long time now. It also had an extremely hairy routine that got called
    from the 32-bit compat routine for adjtimex, which adjusted the
    factor and offset according to what it thought the timekeeping code
    was going to do. Not only was this only called if a 32-bit task did
    adjtimex (i.e. not if a 64-bit task did adjtimex), it was also
    duplicating computations from kernel/timer.c and it wasn't clear that
    it was (still) correct.

    The simple solution is to ask the timekeeping code how long the
    current jiffy will be on each timer interrupt, after calling
    do_timer. If this jiffy will be a different length from the last one,
    we then need to compute new values for the factor and offset used in
    the lockless do_gettimeofday. In this way we can keep xtime and
    do_gettimeofday in sync, even when NTP is varying the tick length.

    Note that when adjtimex varies the tick length, it almost always
    introduces the variation from the next tick on. The only case I could
    see where adjtimex would vary the length of the current tick is when
    an old-style adjtime adjustment is being cancelled. (It's not clear
    to me why the adjustment has to be cancelled immediately rather than
    from the next tick on.) Thus I don't see any real need for a hook in
    adjtimex; the rare case of an old-style adjustment being cancelled can
    be fixed up at the next tick.

    Signed-off-by: Paul Mackerras
    Acked-by: john stultz
    Signed-off-by: Linus Torvalds

    Paul Mackerras
     

31 Oct, 2005

1 commit

  • Create a macro shift_right() that avoids the numerous ugly conditionals in the
    NTP code that look like:

    if(a < 0)
    b = -(-a >> shift);
    else
    b = a >> shift;

    Replacing it with:

    b = shift_right(a, shift);

    This should have zero effect on the logic, however it should probably have
    a bit of testing just to be sure.

    Also replace open-coded min/max with the macros.

    Signed-off-by : John Stultz

    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    john stultz
     

08 Sep, 2005

1 commit

  • This patch cleans up a commonly repeated set of changes to the NTP state
    variables by adding two helper inline functions:

    ntp_clear(): Clears the ntp state variables

    ntp_synced(): Returns 1 if the system is synced with a time server.

    This was compile tested for alpha, arm, i386, x86-64, ppc64, s390, sparc,
    sparc64.

    Signed-off-by: John Stultz
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    john stultz
     

17 Apr, 2005

1 commit

  • Initial git repository build. I'm not bothering with the full history,
    even though we have it. We can create a separate "historical" git
    archive of that later if we want to, and in the meantime it's about
    3.2GB when imported into git - space that would just make the early
    git days unnecessarily complicated, when we don't have a lot of good
    infrastructure for it.

    Let it rip!

    Linus Torvalds