From owner-freebsd-hackers Thu Jul 8 8:28: 6 1999 Delivered-To: freebsd-hackers@freebsd.org Received: from godzilla.zeta.org.au (godzilla.zeta.org.au [203.26.10.9]) by hub.freebsd.org (Postfix) with ESMTP id E214E1530A; Thu, 8 Jul 1999 08:27:59 -0700 (PDT) (envelope-from bde@godzilla.zeta.org.au) Received: (from bde@localhost) by godzilla.zeta.org.au (8.8.7/8.8.7) id BAA04078; Fri, 9 Jul 1999 01:27:14 +1000 Date: Fri, 9 Jul 1999 01:27:14 +1000 From: Bruce Evans Message-Id: <199907081527.BAA04078@godzilla.zeta.org.au> To: dfr@nlsystems.com, tanimura@naklab.dnj.ynu.ac.jp Subject: Re: Rewriting pca(4) using finetimer(9) (was: Re: MPU401 now worksunder New Midi Driver Framework with a Fine Timer) Cc: freebsd-current@FreeBSD.ORG, freebsd-hackers@FreeBSD.ORG, julian@whistle.com Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG >dfr> If I understand this correctly, you are suggesting that we program timer0 >dfr> so that we only take interrupts when a finetimer is due to fire? If so, >dfr> then it sounds very good. The idea of taking 6000+ interrupts/sec made me >dfr> uneasy, even though most would return without doing any work. 6000+ interrupts/sec is not many, unless it is done all the time. A 486/33 can handle about 50000 (16000 for pcaudio + 3 * 11520 for sio's). >There is one problem in this method. acquire_timer0() is only implemented >for i386. We would need to write something equivalent for alpha... This is a serious problem. acquire_timer0() is currently disabled even for i386's when the i8254 is used for timecounting. This is not hard to fix (the hooks into clkintr() work even better with timecounters since it is not necessary to resynchronise clock interrupts after a state change), but an i8254 interrupt frequency of 16000 Hz is too fast to be used routinely if the i8254 is being used for timecounting (even if the CPU can keep up with the interrupts, the overflow heuristics in i8254_get_timecount() may break down). Other systems may have even more limitations on the timecounters. Bruce To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message