Re: Time keeping Issues with the low-resolution TSC timecounter

From: Fabian Keil <freebsd-listen_at_fabiankeil.de>
Date: Mon, 13 Jun 2011 22:23:53 +0200
Jung-uk Kim <jkim_at_FreeBSD.org> wrote:

> On Monday 13 June 2011 12:44 pm, Fabian Keil wrote:
> > I'm experiencing time-related issues that seem to be caused by
> > the low-resolution TSC timecounter (r222866).
> >
> > The problem I noticed first is that it takes unusually long until a
> > key press is repeated. With the default eventtimer (HPET) it seems
> > to take about 4s, which can be slightly improved by switching to
> > i8254.
> >
> > The "error beep" seems to take longer than usual, too,
> > and the system "feels sluggish" in general.
> >
> > An effect that is easier to measure is that the system is unable
> > to properly keep the time. Again the problem is less severe when
> > using i8254 instead of HPET:
> 
> [SNIP]
> 
> First of all, please do not mix timecounter issues with eventtimer.  
> They are not directly related.

I see.

> Can you please show me verbose boot messages *without* your patch?  

Attached.

> Does "sysctl kern.timecounter.hardware=HPET" help *without* touching 
> eventtimers?

Yes:

fk_at_r500 ~/test/freebsd/timeissues $while sudo /etc/rc.d/ntpdate onestart; do sleep 1; done
Setting date via ntp.
13 Jun 22:17:34 ntpdate[3983]: step time server 67.223.229.211 offset 1.441733 sec
Setting date via ntp.
13 Jun 22:18:03 ntpdate[3994]: step time server 67.223.229.211 offset 26.123750 sec
Setting date via ntp.
13 Jun 22:18:31 ntpdate[4005]: step time server 70.86.250.6 offset 25.244873 sec
^C
fk_at_r500 ~/test/freebsd/timeissues $sudo sysctl kern.timecounter.hardware=HPET
kern.timecounter.hardware: TSC-low -> HPET
fk_at_r500 ~/test/freebsd/timeissues $while sudo /etc/rc.d/ntpdate onestart; do sleep 1; done
Setting date via ntp.
13 Jun 22:18:44 ntpdate[4018]: step time server 208.53.158.34 offset 8.805897 sec
Setting date via ntp.
13 Jun 22:18:47 ntpdate[4029]: step time server 67.223.229.211 offset -0.007736 sec
Setting date via ntp.
13 Jun 22:18:50 ntpdate[4040]: step time server 208.53.158.34 offset 0.007797 sec
Setting date via ntp.
13 Jun 22:18:54 ntpdate[4051]: step time server 67.223.229.211 offset -0.006866 sec
Setting date via ntp.
13 Jun 22:18:57 ntpdate[4062]: step time server 131.188.3.220 offset -0.000935 sec
^C

Thanks.

Fabian

Received on Mon Jun 13 2011 - 18:26:38 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:40:14 UTC