From owner-freebsd-hackers Mon Oct 23 21:04:28 1995 Return-Path: owner-hackers Received: (from root@localhost) by freefall.freebsd.org (8.6.12/8.6.6) id VAA02267 for hackers-outgoing; Mon, 23 Oct 1995 21:04:28 -0700 Received: from who.cdrom.com (who.cdrom.com [192.216.222.3]) by freefall.freebsd.org (8.6.12/8.6.6) with ESMTP id VAA02242 for ; Mon, 23 Oct 1995 21:04:11 -0700 Received: from godzilla.zeta.org.au (godzilla.zeta.org.au [203.2.228.19]) by who.cdrom.com (8.6.12/8.6.11) with ESMTP id VAA01169 for ; Mon, 23 Oct 1995 21:04:04 -0700 Received: (from bde@localhost) by godzilla.zeta.org.au (8.6.9/8.6.9) id NAA30871; Tue, 24 Oct 1995 13:48:03 +1000 Date: Tue, 24 Oct 1995 13:48:03 +1000 From: Bruce Evans Message-Id: <199510240348.NAA30871@godzilla.zeta.org.au> To: freebsd-hackers@freebsd.org, guido@gvr.win.tue.nl Subject: Re: clk interrupts > 150/sec??? Sender: owner-hackers@freebsd.org Precedence: bulk >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