Subject: slow kernel
To: None <>
From: Niklas Hallqvist <>
List: amiga-dev
Date: 08/11/1994 00:57:18
I don't really know when my kernel started getting slow.  Possibly it was
the fact that I put in 8MB of slow 16-bit RAM when I got multiple-chunk
working on top of my 4MB fast 60ns 32-bit RAM (I have a GVP combo running
at 33MHz).  How do I notice it?  Well it's only at fast serial rates like
19200 or 38400.  As NetBSDs input flow control is somewhat buggy (hey, I do
not even know of a serial driver that supports RTS) ordinary dialout on my
Retina console is unusable.  A full screen refresh requires about 7.5KB of
chars to be received on the serial port which the Amiga ser.c driver just
can't handle if the user-level process don't keep up.  So I fixed tty.c and
added RTS handling to ser.c.  Now, input is received in chunks of about
TTYHOG (= 1K) sized chunks.  This means that during ordinary 19200 receive
with Retina console output my CPU is totally used up.  First half-a-seconds
worth of chars is received by the modem, I can see the RXD lamp blink during
that time, then RTS is dropped and my user-process (kermit) gets this chunk
of chars and diverts them to the Retina, this process takes also about half-a-
second, during this time the RXD lamp is out, as it should be.  Then the
process starts over again.

Does this sound reasonable?  Who is to blame, the serial driver's interrupt
routines (I don't think so, I find them close to optimal), the tty code,
the multichunk spport or the Retina console?  Or is this speed really to
be expected when using 8MB of 16bit RAM?  Is it maybe the chipmem bandwidth
that is too low.  No, it's not the GVP maxdma, it's lowered to 512 already
and on top of that *no* disk activity is going on at this time.  Have somebody
else seen this?  Have somebody counted cycles for serial and vbl interrupts?
If it's chipmem bandwith that's to blame, how should I go on to measure it
or calculate the optimal 16-bit mem population.  Of course, there's always
empiric ways to do it, but I prefer theory.  A propos chipmem BW, my CC console
is configured but not used, does it take up BW then?  It's maximally overscanned.