From owner-freebsd-hackers Sat Dec 30 23:34:31 1995 Return-Path: owner-hackers Received: (from root@localhost) by freefall.freebsd.org (8.7.3/8.7.3) id XAA12087 for hackers-outgoing; Sat, 30 Dec 1995 23:34:31 -0800 (PST) Received: from godzilla.zeta.org.au (godzilla.zeta.org.au [203.2.228.19]) by freefall.freebsd.org (8.7.3/8.7.3) with SMTP id XAA12061 for ; Sat, 30 Dec 1995 23:34:07 -0800 (PST) Received: (from bde@localhost) by godzilla.zeta.org.au (8.6.9/8.6.9) id SAA22598; Sun, 31 Dec 1995 18:31:34 +1100 Date: Sun, 31 Dec 1995 18:31:34 +1100 From: Bruce Evans Message-Id: <199512310731.SAA22598@godzilla.zeta.org.au> To: hackers@freebsd.org, imb@scgt.oz.au Subject: Re: 2.1 instabilities Sender: owner-hackers@freebsd.org Precedence: bulk >As a consequence of (not unexpected) instabilities in -current, I reverted >four of my machines back to -stable but I have a few niggling problems. >Two of them occasionally stop dead whilst under heavy ppp load. Both are >using kernel-based ppp. One of them simply stops blinking his cursor and >simply goes to sleep. No keyboard response, nothing :-(. Very rarely, it >will just spontaneously reboot (which I'd actually prefer as it's 4km away). Try the following fix from -current: --- [part of] diff -c -2 -r1.8.4.1 -r1.12 *** spl.h 1995/08/23 09:43:11 1.8.4.1 --- spl.h 1995/10/30 17:01:37 1.12 *************** *** 63,69 **** * run while other swi handlers are running and timeout routines can call * swi handlers. Everything includes SWI_AST_MASK so that AST's are masked ! * until just before return to user mode. */ ! #define SWI_TTY_MASK (SWI_TTY_PENDING | SWI_CLOCK_MASK) #define SWI_NET_MASK (SWI_NET_PENDING | SWI_CLOCK_MASK) #define SWI_CLOCK_MASK (SWI_CLOCK_PENDING | SWI_AST_MASK) --- 63,73 ---- * run while other swi handlers are running and timeout routines can call * swi handlers. Everything includes SWI_AST_MASK so that AST's are masked ! * until just before return to user mode. SWI_TTY_MASK includes SWI_NET_MASK ! * in case tty interrupts are processed at splsofttty() for a tty that is in ! * SLIP or PPP line discipline (this is weaker than merging net_imask with ! * tty_imask in isa.c - splimp() must mask hard and soft tty interrupts, but ! * spltty() apparently only needs to mask soft net interrupts). */ ! #define SWI_TTY_MASK (SWI_TTY_PENDING | SWI_CLOCK_MASK | SWI_NET_MASK) #define SWI_NET_MASK (SWI_NET_PENDING | SWI_CLOCK_MASK) #define SWI_CLOCK_MASK (SWI_CLOCK_PENDING | SWI_AST_MASK) --- >The other, the only other under such a heavy load, stops forwarding IP >packets and a ping (from the host itself) to any one of the remote users >returns a "cannot write, no buffers available" error. The mbuf cluster count >is <100 although there are usually somewhere around 100-300 mbufs allocated >to data (load dependent). Killing any pppd will solve the problem until the >next recurrence. The fix is less likely to help here. >... >Switching to user-mode PPP is not an option .. each link is sufficiently >saturated so as to cause echo packets to be lost (or delayed beyond its >tolerance). Using it, none of them will stay connected for >15 minutes with >the end-user's current data rates (bulk NNTP traffic yielding averages above >3000cps). 3000 cps/line (8 lines?). That is possible but perhaps not easy for the 486DX33. These changes from -current and hsu's changes for increasing the buffer sizes might help. These changes only affect termios mode, not slip or ppp. --- [part of] diff -c -2 -r1.46.2.2 -r1.78 *** tty.c 1995/11/03 08:01:04 1.46.2.2 --- tty.c 1995/12/16 21:45:02 1.78 *************** *** 216,220 **** */ clist_alloc_cblocks(&tp->t_canq, TTYHOG, 512); ! clist_alloc_cblocks(&tp->t_outq, TTMAXHIWAT + 200, 512); clist_alloc_cblocks(&tp->t_rawq, TTYHOG, TTYHOG); --- 222,227 ---- */ clist_alloc_cblocks(&tp->t_canq, TTYHOG, 512); ! clist_alloc_cblocks(&tp->t_outq, TTMAXHIWAT + OBUFSIZ + 100, ! TTMAXHIWAT + OBUFSIZ + 100); clist_alloc_cblocks(&tp->t_rawq, TTYHOG, TTYHOG); *************** *** 1161,1165 **** --- 1168,1185 ---- ttwakeup(tp); if (ISSET(tp->t_state, TS_TBLOCK)) { + if (rw & FWRITE) + FLUSHQ(&tp->t_outq); ttyunblock(tp); + + /* + * Don't let leave any state that might clobber the + * next line discipline (although we should do more + * to send the START char). Not clearing the state + * may have caused the "putc to a clist with no + * reserved cblocks" panic/printf. + */ + CLR(tp->t_state, TS_TBLOCK); + + #if 0 /* forget it, sleeping isn't always safe and we don't know when it is */ if (ISSET(tp->t_iflag, IXOFF)) { /* *************** *** 1181,1184 **** --- 1201,1205 ---- goto again; } + #endif } } *************** *** 1672,1676 **** s = spltty(); oldsig = wait ? curproc->p_siglist : 0; ! if (tp->t_outq.c_cc > hiwat + 200) while (tp->t_outq.c_cc > hiwat) { ttstart(tp); --- 1699,1703 ---- s = spltty(); oldsig = wait ? curproc->p_siglist : 0; ! if (tp->t_outq.c_cc > hiwat + OBUFSIZ + 100) while (tp->t_outq.c_cc > hiwat) { ttstart(tp); --- Bruce