Subject: Re: O_ASYNC on ttys
To: None <>
From: der Mouse <mouse@Rodents.Montreal.QC.CA>
List: tech-kern
Date: 07/07/2001 15:13:19
>> I have a program that wants to be woken up at 240Hz.  Since I'm
>> doing this on a SPARC, whose clock interrupts at only 100Hz, I
>> connected a loopback connector to one of the serial lines, set it to
>> 2400bps, and then started dumping characters at it.  Of course, they
>> came back at 240Hz, just as I wanted.

> I'm surprized that works.  Are you sure you're getting 240Hz wakeups?

At the time I wrote the original message, I hadn't yet gotten the
kernel rebuilt and tested; I wasn't getting any wakeups.  (Note my
wording: "[the characters[ came back at 240Hz", not "I got 240Hz

Now, with the change I proposed, I am getting wakeups.  They are
happening significantly more often than 100Hz; I can tell that much
just by seat-of-the-pants feel.  I haven't instrumented the program
enough to get even approximate frequency figures, but it's in the right

> Anyway, it might be more profitable in the long run to increase the
> kernel clockrate.

I would if I knew how.  As I understand it, not all hardware can do
this, and I have no idea whether mine can - nor, if it can, how to make
it do so.

And someday I really must implement AF_TIMER sockets....

/~\ The ASCII				der Mouse
\ / Ribbon Campaign
 X  Against HTML
/ \ Email!	     7D C8 61 52 5D E7 2D 39  4E F1 31 3E E8 B3 27 4B