From owner-freebsd-current Sun Jul 2 08:24:58 1995 Return-Path: current-owner Received: (from majordom@localhost) by freefall.cdrom.com (8.6.10/8.6.6) id IAA01223 for current-outgoing; Sun, 2 Jul 1995 08:24:58 -0700 Received: from godzilla.zeta.org.au (godzilla.zeta.org.au [203.2.228.34]) by freefall.cdrom.com (8.6.10/8.6.6) with ESMTP id IAA01194 for ; Sun, 2 Jul 1995 08:24:30 -0700 Received: (from bde@localhost) by godzilla.zeta.org.au (8.6.9/8.6.9) id BAA16708; Mon, 3 Jul 1995 01:19:59 +1000 Date: Mon, 3 Jul 1995 01:19:59 +1000 From: Bruce Evans Message-Id: <199507021519.BAA16708@godzilla.zeta.org.au> To: hsu@clinet.fi Subject: Re: kern/579: sio: RS_IBUFSIZE 256 too small Cc: current@freebsd.org Sender: current-owner@freebsd.org Precedence: bulk >>Synopsis: sio: RS_IBUFSIZE at 256 bytes serial lines loose data (PPP) > A 486-40 with 6 16550 ports and 4 ethernets (3 active) > A 386-16 with 1 16550 ports and 1 ethernet (just a PPP router) >>Description: > Both these machines report "interrupt-level buffer overflow":s > very frequently on a leased line running at 38400, badly dropping > IP performance. This is because you don't use crtscts and something or other delays softclock() by more than (RB_IBUFSIZE - ceil(38400/10/100.0) = 217 character times, i.e., for more than 5.5 clock interrupts. Hardware interrupts and all other software interrupts have priority over softclock(), so any solid block of hardware or net interrupts would do this. I would be surprised if ethernet interrupts on the 386/16 didn't do it. > On 386-16 I also saw several spontaneous reboots when loading the > PPP link. Another problem. I saw a spontaneous reboot today when I did something silly involving pppd and tcpdump. The system normally just panics when tcpdump is killed after pppd is killed. >>How-To-Repeat: > It seems that this bites only me, even though it does this on two > quite different configurations. In addition the 486 machine has I think you said that 1.1.5 doesn't have the problem. I can't explain how it could work better. -current should work a little better because ordinary timeouts are no longer used. Hardware interrupts still block siopoll() but soft net interrupts don't. >>Fix: > > I changed RS_IBUFSIZE from 256 to 4096, and the problem disappeared. > It might be that a smaller amount would be sufficient (I don't mind > 8k memory waste per line in this case). But it is apparent that > 256 bytes seems not sufficient for slow or loaded machines. >sio.c: >< #define RS_IBUFSIZE 256 >-- >> #define RS_IBUFSIZE 4096 This breaks crtscts unless you make TTYHOG 16 times as large to match. The watermark RB_I_HIGH_WATER = (TTYHOG - 2 * RB_IBUFSIZE) must be significantly larger than 0. TTYHOG must to be larger than 2 * RB_IBUFSIZE even without crtscts. Bruce