From owner-freebsd-bugs@FreeBSD.ORG Wed Mar 23 13:42:44 2005 Return-Path: Delivered-To: freebsd-bugs@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 3E18916A4CE for ; Wed, 23 Mar 2005 13:42:44 +0000 (GMT) Received: from mailout2.pacific.net.au (mailout2.pacific.net.au [61.8.0.85]) by mx1.FreeBSD.org (Postfix) with ESMTP id 958F643D3F for ; Wed, 23 Mar 2005 13:42:43 +0000 (GMT) (envelope-from bde@zeta.org.au) Received: from mailproxy2.pacific.net.au (mailproxy2.pacific.net.au [61.8.0.87])j2NDgfHn022277; Thu, 24 Mar 2005 00:42:41 +1100 Received: from epsplex.bde.org (katana.zip.com.au [61.8.7.246]) j2NDg8Mq025750; Thu, 24 Mar 2005 00:42:40 +1100 Date: Thu, 24 Mar 2005 00:42:07 +1100 (EST) From: Bruce Evans X-X-Sender: bde@epsplex.bde.org To: Tarasov Oleg In-Reply-To: <815955888.20050323113529@osk.com.ua> Message-ID: <20050323235823.E19701@epsplex.bde.org> References: <815955888.20050323113529@osk.com.ua> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed cc: freebsd-bugs@FreeBSD.org Subject: Re: sio interrupt-level buffer overflows X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 23 Mar 2005 13:42:44 -0000 On Wed, 23 Mar 2005, Tarasov Oleg wrote: > I have FreeBSD 5.3-STABLE installed. Since I've installed a new 115200 > Kbit/s modem and established ppp connection using kernel ppp, I > started recieving following messages: > > sio0: 296 more interrupt-level buffer overflows (total 57038) Working flow control might mask the kernel bug causing this. Are you using pppd's crtscts option? If things used to work, then the problem might be amplified by the new modem not having working flow control. > This message repeats almost every minute meaning serious malfunction > in the channel. > > Bruce Evans wrote in > http://lists.freebsd.org/pipermail/freebsd-bugs/2003-May/000687.html > >> Try changing this line in sio.c: >> >> cp4ticks = speed / 10 / hz * 4; >> >> to something like: >> >> cp4ticks = speed / 10 / hz * 40; >> or if you use a non-default value for hz (default is 100): >> >> cp4ticks = speed / 10 / 100 * 40; > > the change to > > cp4ticks = speed / 10 / hz * 40; > > made my kernel panic every 20 minutes > I use ipfw with dummynet and have set following all recommendations > > HZ=1000 > > in my kernel configuration. So, we have I forgot that -current (and maybe 5.3 too) made the too large value of 1000 for HZ the default. So even the default configuration is now broken. > > cp4ticks = speed / 10 / 100 * 40 == speed / 10 / 1000 * 4 > > (what is the default, unchanged value) and must work properly > but due to unproper interrupt latency we have these overflows. > So, changing cp4ticks to > > cp4ticks = speed / 10 / hz * 40; == speed / 10 / 1000 * 40 This is the right thing to try. > > made my kernel panic. Oops. I can't explain the panic. The only relevant difference that I can think of is that the change gives larger interrupt-level buffers in sio. ppp might be depending on them not being very large. However, at the interrupt level, ppp just copies data 1 character at a time into mbufs, so there is not much to go wrong. Does the panic occur in ppp (in the kernel) or in sio? Bruce