Subject: Re: your mail
To: Mark Murdock <mkmurdoc@delta.greenland.com>
From: Bill Studenmund <wrstuden@loki.stanford.edu>
List: port-mac68k
Date: 01/08/1998 19:28:54
> First one is mainly for Bill Studenmund, as it deals with serial ports.
> Bill, I know that at some point in the past you have advised on how to
> deal with silo overruns when dialed into the internet at 28800 bps.  Not
> only that, but I know you also instructed someone on how to increase the
> maximum line speed that can be used with a slip or ppp connection.  Both
> bits of advice I cannot locate, so I wonder if you wouldn't mind going
> over those again with me?  Here's what I have already tried, and it has
> seemed to help with the silo overrun issue:
> In /usr/src/sys/dev/ic/z8530tty.c I increased ZSTTY_RING_SIZE to 4096.
> And in an (excuse the expression) half-assed attempt I increased
> ZS_STD_BRG in /usr/src/sys/arch/mac68k/dev/zs.c to (230400*4).  I was
> hoping that would allow me to select speeds over 57600 for slip and ppp?

Did you change the crystal hooked to the scc when you changed ZS_STD_BRG?
That value (230400) represents the clock rate from the crystal divided
by 16. 16 because every transmission mode will divide it by at least 16.
By changing this value, the kernel's idea of what a certain baud rate
divisors do and the baud rate actually generated differ.

In the above scenario, asking for 28800 would have set the baud rate
divisor to make 7200 baud. I don't think that's how you meant to reduce
overflows. :-)

What kind of computer do you have? It's pointless to go through the mod
to enable higher baud rates if the computer won't handle it. Remember
ppp and slip send packets. If ONE byte goes bad in a packet, the whole
thing must be re-sent. If you are sending 1500 byte packets (standard for
ppp w/ no fragmenting routers) and one byte in 15000 gets dropped
while doing a heavy download, each 1500 byte packet with a bad byte
must be resent. Your transfer rate will be down by 10% in this example.
So it won't take much in the way of silo overflows to kill your connection.

For this reason, if you're having many silo overruns, you might want to
lower the connection baud rate.

Oh, to get back to the original question, there's not much you can do about
silo overruns. That means that we didn't get to the chip fast enough, and
we lost a byte or more of sent data.

Changing the value of ZSTTY_RING_SIZE, which you can do in the kernel
config file, will help with floods. Not with silo overflows. A flood
is where we read the chip, but didn't do anything with all of the
data in the buffer before it filled up (i.e. 2048 bytes came in, almost
one second's worth of data, when the tty system was blocked from
operating).

Something's wrong in how we have the interrupts set up. Scott wants to
work on it after everyone can breath from 1.3.

Take care,

Bill