*BSD News Article 37515


Return to BSD News archive

Xref: sserve comp.os.linux.development:18694 comp.os.linux.misc:28832 comp.os.386bsd.questions:14243 comp.os.386bsd.misc:3975 sci.electronics:83315
Path: sserve!newshost.anu.edu.au!harbinger.cc.monash.edu.au!msuinfo!agate!howland.reston.ans.net!gatech!news-feed-1.peachnet.edu!news.duke.edu!news.mathworks.com!yeshua.marcam.com!charnel.ecst.csuchico.edu!olivea!wetware!kaiwan.com!exit.com!exit.com!not-for-mail
From: Frank Mayhar <frank>
Newsgroups: comp.os.linux.development,comp.os.linux.misc,comp.os.386bsd.questions,comp.os.386bsd.misc,sci.electronics
Subject: Re: 16550 detection
Date: 3 Nov 1994 13:56:42 -0800
Organization: Subversive Atheists -R- Us
Lines: 68
Sender: frank@exit.com
Message-ID: <199411032154.NAA12270@exit.com>
References: <CMETZ.94Oct30051603@itchy.inner.net> <TYTSO.94Oct31162517@dcl.mit.edu> <MICHAELV.94Oct31211019@MindBender.HeadCandy.com> <TYTSO.94Nov1182557@dcl.mit.edu>
Reply-To: fmayhar@netcom.com
NNTP-Posting-Host: exit.com
X-Copyright0: Copyright 1994 Frank Mayhar.  All Rights Reserved.
X-Copyright1: Permission granted for electronic reproduction as Usenet News or email only.
Cc: 

In article <TYTSO.94Nov1182557@dcl.mit.edu>,
Theodore Y. Ts'o <tytso@athena.mit.edu> wrote:
>If the Hayes ESP card emulates a 16550 accurately, all the more power to
>it (and you).  I still claim a 1024 byte fifo is mostly useless, though.
>At 38400 baud, it takes quarter a second to send 1024 bytes.  If your
>operating system has an interrupt latency that's that long, you have big
>problems.....

Of course, the ESP supports rates of up to 115,200 bps in regular mode
and (apparently) over 900k bps in enhanced mode (I don't have the docs
here, they're at home).  In the former case, that 1024 bytes is 89 ms, and
in the latter it's only about 11 ms.  That's when that FIFO starts becoming
very useful.  You may say that such speeds are unrealistic, but with
v.34 and compression, throughputs of 115200 should become fairly common
on compressible data, and with ISDN you need the higher rates, since
you'll be running at up to 128kbps uncompressed.  Without that 1024-byte
FIFO, the host would quickly become swamped with interrupts.  At 115,200,
that's 720 interrupts per second with a 16-byte FIFO, and at 900kbps,
that's over 5600 per second.  That 1024-byte FIFO reduces this to 12
and 87, respectively, around an order of magnitude fewer.  (The ESP
supports DMA, as well, which further reduces the load on the host.)

>And, because of the latency issue, the Hayes ESP card must have fairly
>small receiver timeouts (the time between when there are characters
>start entering the FIFO and when the Hayes ESP card signals an
>interrupt).  Otherwise, you would have unacceptable delays between when
>you typed a character, and when the operating system actually echoed it.
>Thus, most of the time most of the FIFO is probably completely unused.

True, but when you need it, you'll need it badly.  Streaming protocols,
for example, can fill the bandwidth quickly, particularly when using
compression across the wire.  At 115,200, the receiver timeout could be
one FIFO worth.  A tenth-second delay is on the edge of being unnoticeable;
I'm dealing with greater than that right now, using a v.32bis modem across
a network.  If it is noticeable for some, it could be reduced by half.  I
don't yet have the specs for the card, but I'm sure it's programmable.

>I can well believe that you can reprogram the Hayes ESP card to better
>take advantage of the 1024 byte buffer.  For example, if you know that
>you don't care about latency (since you're doing a kermit file
>transfer), then you could tell it to incrase the receiver timeouts
>significantly.  Or, if the ESP card actually has some intelligence, you
>could program it so that when it receive a specific character (such as a
>SLIP framing character) it sends an interrupt right away; otherwise, it
>waits (say) 100ms before actually sending a receive interrupt.

Well, maybe.  But you're expecting to use it at low data rates interactively.
I'm expecting to use it at much higher rates, and/or as a part of a network.
Sure, large FIFOs are overkill at 38400 bps, but at 57600 bps (the speed
I use at the moment) and better those FIFOs begin to look more like buffers
on a networking interface card.  Indispensable.

>However, if you're using your Hayes ESP card in 16550 compatibility
>mode, you're probably not really taking much advantage of your 1024 byte
>FIFO.  It looks good, and sounds sexy; but is actually practical?
>Probably not.

I disagree.  At the data rates I mean to use, the large FIFO and DMA
capability will mean a *greatly* reduced load on an already overtaxed
CPU.  At $10 for a single-port card (at Computer City a couple of
weeks ago), it's a bargain, as well.

Or it will be as soon as I write a FreeBSD driver for it, and get the
thing installed.
-- 
Frank Mayhar fmayhar@netcom.com (soon frank@exit.com)
	     32640 Nantasket Dr. #3, Rancho Palos Verdes, CA 90275