[Need Help] time: questions about kernel function timekeeping_bigadjust()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi All,

Could anybody explain the following kernel code for me in detail ? I am
royally confused on it.

kernel/time/timekeeping.c

timekeeping_bigadjust()
{
        /*   
         * Use the current error value to determine how much to look ahead.
         * The larger the error the slower we adjust for it to avoid problems
         * with losing too many ticks, otherwise we would overadjust and
         * produce an even larger error.  The smaller the adjustment the
         * faster we try to adjust for it, as lost ticks can do less harm
         * here.  This is tuned so that an error of about 1 msec is adjusted
         * within about 1 sec (or 2^20 nsec in 2^SHIFT_HZ ticks).
         */
        error2 = tk->ntp_error >> (NTP_SCALE_SHIFT + 22 - 2 * SHIFT_HZ);
}


Thanks in advance.


-- 
Best Regards,
Dong Zhu

MySite: http://bluezd.info

_______________________________________________
Kernelnewbies mailing list
Kernelnewbies@xxxxxxxxxxxxxxxxx
http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies

[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux