Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 14 Nov 1996 22:30:10 +1100
From:      Bruce Evans <bde@zeta.org.au>
To:        alex@yahoo.com, sos@ravenock.cybercity.dk
Cc:        hardware@FreeBSD.org
Subject:   Re: FreeBSD as Terminal Server
Message-ID:  <199611141130.WAA10910@godzilla.zeta.org.au>

next in thread | raw e-mail | index | archive | help
>In reply to Alexander Winske who wrote:
>> 
>> Howdy,
>>  I'm looking to set up a largish terminal server on
>> a FreeBSD box. (I want to log console output and allow
>> console sessions with approx. 75-100 hosts).
>> 
>> Can anyone out there recommend a flavor of multiport
>> serial card that will allow me to have that many ports?
>> I would think that they wouldn't have to be doing more than
>> 2400 baud each, if that makes any difference...

3 * 32-port Cyclades boards should work OK at such a low speed,
but are very expensive (list prices are US$1328 for a 32Ye (ISA)
and $1537 for a 32YeP (PCI).  Discount prices seem to be slightly
more than half the list prices).

>Look at some of the newer Stallion boards, I think they support
>upto 64 ports per card, so two of them should have you
>rolling.

You'd need to translate the istallion driver from the Linlish :-).
The current version is too green to use.  It disables interrupts
and calls tsleep() :-(.

I did a quick check for drivers in isa/*.c that abuse disable_intr()
and found these:

ctx.c: disables interrupts and calls uiomove().  Apart from disabling
	interrupts too long, this probably causes big problems if
	uiomove() pagefaults.
istallion.c: uses disable_intr() a lot when it should just use spltty().
	Disables interrupts and calls tsleep().  This probably causes
	big problems.
joy.c: disables interrupts and polls.  There seems to be no better way
	to handle the braindamaged joystick h/w.
ncr5380.c: disables interrupts and busy-waits for too long.
rc.c: harmlessly disables interrupts a lot when it should just use
	spltty().  This is because some of it was duplicated from an
	old version of sio.  Sio needs to disable interrupts because it
	uses a fast-interrupt handler, but rc doesn't (yet?).
stallion.c: like istallion.c except it doesn't call tsleep() with
	interrupts disabled.

disable_intr()/enable_intr() should only be used by drivers in 2 cases:
1) when the driver uses a fast-interrupt handler.
2) to access hardware registers when there are timing constraints.

Interrupts should not be masked for more than 10 usec outside of fast-
interrupt handlers or for more than 100 usec inside fast-interrupt
handlers.  Systems with a huge number of (sio or cy) serial ports can't
possibly meet the 100 usec constraint :-).

>You'd need a decent CPU and plenty of RAM though.

At least a 486/33 with 4M of RAM for a dedicated system :-).
100 * 240 bytes/sec is a whole 24K/sec.  In practice, I guess
the average throughtput would be closer to 24 bytes/sec and the
connection speed would be about 9600 instead of 2400.  (Don't use
2400, at least with sio or cy boards, because the fifo trigger
level will be set to 1 to improve latency - this makes the maximum
burst rate marginal for a 486/33.  Don't use much more than 9600
since e.g. 115200 would make the maximum burst rate too large
for a P6/200.)

Bruce



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199611141130.WAA10910>