Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 5 Mar 1998 16:46:35 +1100
From:      Bruce Evans <bde@zeta.org.au>
To:        dmaddox@scsn.net, mike@smith.net.au
Cc:        current@FreeBSD.ORG, evanc@synapse.net, Matthew.Thyer@dsto.defence.gov.au, shimon@simon-shapiro.org
Subject:   Re: silo overflows (Was Re: 3.0-RELEASE?)
Message-ID:  <199803050546.QAA04052@godzilla.zeta.org.au>

next in thread | raw e-mail | index | archive | help
>> Index: sio.c
>> ===================================================================
>> RCS file: /local/home/ncvs/src/sys/i386/isa/sio.c,v
>> retrieving revision 1.194
>> diff -r1.194 sio.c
>> 117a118
>> > /*
>> 119a121,123
>> > */
>> > #define RB_I_HIGH_WATER (TTYHOG / 2)
>> > #define RS_IBUFSIZE (TTYHOG / 4)

This is internally inconsistent (high water is twice as high as the
container), and breaks RTS flow control unless you make corresponding
changes in tty.c.

>> Add this to your system conf:
>> 
>> options		"MSIZE=256"
>
>Interesting; why change the mbuf size?  Is this a recommended change 
>for general operation, or is 128 bytes still preferred?

It's not relevant to serial i/o, anyway.

>> options		"TTYHOG=4096"
>
>This increases tty-internal buffers, but wouldn't be expected to affect 
>interrupt latency.  (There may be some carryover though.)
>
> - Were you seeing "silo overflow" messages?
> - Have the above changes affected your actual throughput?

Apparently it was "interrupt-level buffer overflow".

Changes like the above are certainly required to support speeds above
115200 bps properly, since the driver doesn't support these speeds and
various buffers are sized accordingly.  First, you have to increase the
interrupt-level buffer size.  Then you have to increase the tty buffer
size so that the tty buffer can hold 2 interrupt-level buffers worth of
data without its watermarks going below the container.  If you don't
increase the interrupt-level buffer size, then bad things start
happening at speeds below 23040 cps:

1) if RTS flow control is not enabled, then interrupt-level buffer overflows
   are possible at speeds near 23040 bps.
2) if working RTS flow control is enabled (and works), then the throughput
   will be reduced by flow control to (RS_IHIGHWATER * hz) cps (default
   19200 cps).
3) parts of the above only apply to the termios line discipline.  If you
   use kernel ppp, then 1) and 2) apply but the tty buffer size and
   watermarks don't appluy.

Bruce

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-current" in the body of the message



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