From owner-freebsd-hackers Thu Jul 8 2:40:46 1999 Delivered-To: freebsd-hackers@freebsd.org Received: from rina.naklab.dnj.ynu.ac.jp (rina.naklab.dnj.ynu.ac.jp [133.34.17.16]) by hub.freebsd.org (Postfix) with ESMTP id 36FD214C14; Thu, 8 Jul 1999 02:40:39 -0700 (PDT) (envelope-from tanimura@naklab.dnj.ynu.ac.jp) Received: from rina.naklab.dnj.ynu.ac.jp (localhost [127.0.0.1]) by rina.naklab.dnj.ynu.ac.jp (8.9.1a/3.7W-Naklab-2.1-19981120) with ESMTP id SAA26649; Thu, 8 Jul 1999 18:40:23 +0900 (JST) Message-Id: <199907080940.SAA26649@rina.naklab.dnj.ynu.ac.jp> To: dfr@nlsystems.com Cc: julian@whistle.com, freebsd-hackers@freebsd.org, freebsd-current@freebsd.org Cc: Seigo Tanimura Subject: Re: Rewriting pca(4) using finetimer(9) (was: Re: MPU401 now worksunder New Midi Driver Framework with a Fine Timer) From: Seigo Tanimura In-Reply-To: Your message of "Thu, 8 Jul 1999 09:54:42 +0100 (BST)" References: X-Mailer: Mew version 1.70 on Emacs 19.34.1 / Mule 2.3 Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Date: Thu, 08 Jul 1999 18:40:23 +0900 Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG On Thu, 8 Jul 1999 09:54:42 +0100 (BST), Doug Rabson said: 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. Yes, that is what I am doing now. And some further discussion... > t' > \sum_(k=0)^(j) dt_rem(c_k) > > where the right hand side of the inequality is the time span after which > the callout c_k is made. Then c' is inserted after c_j and new dt_rem(c_(j+1)) > and dt_rem(c_(j+2)) are determined. Now we can acquire_timer0() with dt_rem(c_0). If t' is less than dt_rem(c_0) then we have no feasible j. This is the case in which we must reaquire_timer0() using t'. Then, after interting c', dt_rem(c_1) is updated to be (dt_rem(c_1) - (time elapsed since the last aquire_timer0())), so that c_1 can be armed later. There is one problem in this method. acquire_timer0() is only implemented for i386. We would need to write something equivalent for alpha... Seigo Tanimura To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message