• Andrew Morton's avatar
    [PATCH] More time clean up stuff · a05d0bae
    Andrew Morton authored
    From: george anzinger <george@mvista.com>
    
    This patch addresses issues of roundoff error in the time keeping and NTP
    code as follows:
    
    The conversion of "actual jiffies" to TICK_USEC and then to TICK_NSEC
    introduced large errors if jiffies was not a power of 10 (e.g.  1024 for
    the ia64).  Most of this is avoided by converting directly to TICK_NSEC.
    
    The calculation of MAX_SEC_IN_JIFFIES (the largest timespec or timeval the
    kernel will attempt) had overflow problems in the 64-bit machines.  We
    introduce a different equation for those machines.
    
    The NTP frequency update code was allowing a micro second of error to
    accumulate before applying the correction.  We change FINEUSEC to FINENSEC
    to do the correction as soon as a full nanosecond has accumulated.
    
    The initial calculation of time_freq for NTP had severe roundoff errors for
    HZ not a power of 10 (i.e.  1024).  A new equation fixes this.
    
    clock_nanosleep is changed to round up to the next jiffie to cover starting
    between jiffies.
    a05d0bae
setup_arch_pre.h 1.02 KB