`Hi,On Wed, 24 Aug 2005, john stultz wrote:> Ok, well, I'm still at a loss for understanding how this avoids my> concern about time inconsistencies.Let's take a simple example to demonstrate the difference between system time and reference time.NTP tells us to update the reference time by 1000 units every tick and a single tick consists of 123 cycles, so the initial multiplier is 8. This means after 1 tick the system time is 984 and off by -16:time (ticks)	reference time	system time	mult	error0		0		0		8	01		1000		984		8	-162		2000		1968		8	-323		3000		2952		8	-484		4000		3936		9	-64the error is now big enough, so we speed up system time:5		5000		5043		9	436		6000		6150		8	150and slow it down again:7		7000		7134		8	1348		8000		8118		8	1189		9000		9102		8	10210		10000		10086		8	8611		11000		11070		8	7012		12000		12054		8	5413		13000		13038		8	3814		14000		14022		8	2215		15000		15006		8	616		16000		15990		8	-1017		17000		16974		8	-2618		18000		17958		8	-4219		19000		18942		8	-5820		20000		19926		8	-74let's assume we're late with the update by 10 cycles (gettimeofday=19926+10*8=20006), so a change to the mult also requires a adjustment of the system time:20+10		20000		19916		9	-84so gettimeofday=19916+10*9=2000621		21000		21023		9	2322		22000		22130		8	130now add a single adjustment of 500 to the reference time:23		23500		23114		11	-38624		24500		24467		8	-33A detail which is missing now in my example code is that we actually should look ahead to the next update, so that multiplier is immediately adjusted and the error above would never exceed 123/2 unless an update is delayed.It's really not that difficult :), it's just important to understand the difference between reference time and system time. All the NTP adjustments are done to the reference time and we manipulate the speed of the system clock to keep it close. The latter has _nothing_ to do with NTP so I don't want to see anything called like ntp_adj there.bye, Roman-To unsubscribe from this list: send the line "unsubscribe linux-kernel" inthe body of a message to majordomo@vger.kernel.orgMore majordomo info at  http://vger.kernel.org/majordomo-info.htmlPlease read the FAQ at  http://www.tux.org/lkml/`