Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 7 Jul 1999 19:46:38 -0700 (PDT)
From:      Julian Elischer <julian@whistle.com>
To:        Seigo Tanimura <tanimura@naklab.dnj.ynu.ac.jp>
Cc:        freebsd-hackers@FreeBSD.ORG, freebsd-current@FreeBSD.ORG
Subject:   Re: Rewriting pca(4) using finetimer(9) (was: Re: MPU401 now works under New Midi Driver Framework with a Fine Timer)
Message-ID:  <Pine.BSF.3.95.990707193513.23943h-100000@current1.whistle.com>
In-Reply-To: <199907080224.LAA20834@rina.naklab.dnj.ynu.ac.jp>

next in thread | previous in thread | raw e-mail | index | archive | help


On Thu, 8 Jul 1999, Seigo Tanimura wrote:
> 
> Ow, I thought it was in the mailing list archive, turned out not.
> I will attach the paper below. Sorry for a long mail.
> 
> 
> --- v --- cut here --- v ---
> Unlike 16550, MPU401 does not generate an interrupt on TX-ready.
> So we have to choose one of the following two options to drive
[...]
> alpha and PC98, and tuning hzmul.
> --- ^ --- cut here --- ^ ---
> 
> 
> Seigo Tanimura <tanimura@naklab.dnj.ynu.ac.jp>

This is both more general and less general than aquire_timer0()

aquiretimer0 assumes that there will only be one user of an elevated clock
speed and produces a clock multiple of exactly the period that user
requires.  This allows us to generate a frequency of (for example) 16KHz. 
(not a power of 2)  When it is not used it is turned off and there is no
overhead.

With your scheme the clock needs to be always running at elevated speed. 
Possibly you might have a startup routine that turns on the elevated
frequency, (basically does an 'aquire_timer0()' )  I would say that you
would have more success in implementing your finetimer() by using
"aquiretimer0" than the other way around. 

a finetimer running at 16KHz (using aquire_timer0()) could allow the use
of pca as well.  (assuming we allowed 'reference counts on the timer to
allow multiple clients that can use the same frequency.) 

Many people have thought about this.
there are people who have run the system with Hz set to 1000 or more
without great problems. We have always assumed in writing the code that
hz may change so the code should be insulated from that change.

The scheduling quantum is even done in uSecs and calculated against Hz.

julian




To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-current" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.BSF.3.95.990707193513.23943h-100000>