Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 24 Oct 1995 13:48:03 +1000
From:      Bruce Evans <bde@zeta.org.au>
To:        freebsd-hackers@freebsd.org, guido@gvr.win.tue.nl
Subject:   Re: clk interrupts > 150/sec???
Message-ID:  <199510240348.NAA30871@godzilla.zeta.org.au>

next in thread | raw e-mail | index | archive | help
>How can this be explained:

>[~] guido@iaehv> vmstat -i
>interrupt      total      rate
>clk0 irq0     3884051      156
>^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
>rtc0 irq8     3173264      128
>fdc0 irq6           1        0
>sc0 irq1         2462        0
>ed0 irq5      3667585      147

>I always thought clk0 should have a rate of 100/sec.

Perhaps you used pcaudio.  If it was open all the time
then the clk0 rate should be about 16000.

The rates reported will also be wrong when the counters
overflow.  At 100 Hz, the clk0 counter will overflow
after 497 days.  At 16000 Hz, it will overflow after
only 3 days.  Perhaps the counters should be u_quad_t's
so that they don't overflow so soon.  It is amusing that
the process statistics counters (p_uticks, t_sticks and
p_iticks) are already u_quad_t's.  At a statistics clock
frequency of 128 Hz, this prevents overflow for 23502
billion years.  This seems excessive :-).  u_quad_t's
are more expensive than u_longs.  u_long counters work
for 388 days at 128 Hz.  This is probably long enough
for a single process (the counters are only incremented
while the process is running), but the type is machine-
independent so it needs to be large enough for all
reasonable statistics clock frequencies.

Bruce



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199510240348.NAA30871>