While looking at the stuff in tc_windup(), it occurs to that as this is
called every clock interrupt (typically 100Hz), it would be really nice
if we could shorten the "default" code path.
For example, there is code in there to calculate changes resulting from
adjtime. I suspect (though I'm no NTP expert) that the adjtime call is
only infrequently executed, and therefore recalculating the "th_scale"
(which includes multiplication by a non-power-of-2 number, and division
by the variable frequency), may be avoidable. On some platforms these
are really expensive operations.
So maybe adjtime() or whatever could mark the scale as "dirty" and we
only do this code if it is so marked? Just a thought....
--
Garrett D'Amore, Principal Software Engineer
Tadpole Computer / Computing Technologies Division,
General Dynamics C4 Systems
http://www.tadpolecomputer.com/
Phone: 951 325-2134 Fax: 951 325-2191