Subject: Re: silo overflows
To: None <port-amiga@netbsd.org>
From: Ignatios Souvatzis <is@jocelyn.rhein.de>
List: port-amiga
Date: 02/16/2000 23:09:42
On Wed, Feb 16, 2000 at 02:13:23AM +0000, Lars Hecking wrote:
> 
>  Sorry to return to this months old thread but ...
> 
> Ignatios Souvatzis writes:
> > On Sun, Nov 28, 1999 at 08:28:36PM +0100, Matteo Beccati wrote:
> > > could some one tell me how to deal with silo overflows?
> > 
> > lower the speed even more, maybe.
> > 
> > > I've recompiled the kernel turning on LEV6_DEFER and setting input/output
> > > buffers to 65536/8192, but this doesn't help me much... I've also tried to
> > > lower serial speed to 38400 but silo overflows still slower my connection.
> 
>  I have the same problem (1.4.1, A3k). Setting SERIBUF/SEROBUF to
>  4096/1024 doesn't help at all, I still keep getting hundreds of silo
>  overflows in just a few minutes, and my connection is a lot slower
>  than it should. I can't even type this msg properly because it's so slow.
> 
>  What does LEV6_DEFER do? Where is it documented? Which other paramters
>  could I try to get up to speed (literally)?

see /sys/arch/amiga/conf/GENERIC, near the LEV6_DEFER option.

Honestly, if you have LEV6_DEFER enabled and can't get to speed with an A3000,
something is wrong.

The story is this: 

- the clock interupt is at 6, above the serial receive interupt.
- the serial receive hardware can buffer exactly one character + N-1 bits.
  That is, if the receive interupt isn't handled before the next character is
  complete, it gets lost.

Now, with LEV6_DEFER, the clock interupt is redirected to level 4 in software.
This should be fast enough for something like 57600 line speed (I didn't try
more myself).

The second level of buffering is the SERIBUF.

the Lev6 (or Lev4) interupt is filling a SERIBUF sized ring buffer.
If it fills up to a margin of some 20 characters, we drom the RTS
line.  If the modem fails to stop sending us stuff within 20
character times, we're lost again, but would get "ring buffer
overflows" instead.

Now, what CPU and what disk controller do you use?

P5 DMA hardware (other than the CS Mk.3) is known to block the CPU out of
memory for extended times. Others might do the same.  Michael Hitch
introduced a hack to limit this problem some years ago.

68040 and 68060 machines do the same when flushing caches btw. Shouldn't
matter at 38400 bps.

> tty00 33600     # modem port and speed

So, if you have LEV6_DEFER, and see "silo voerflows" at  speed that
low, I suggest you make sure you first remove locore.o and recompile
the kernel.  If you still have the problem, some DMA device is
misbehaving.

Regards,
	-is