Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 24 Mar 2005 00:42:07 +1100 (EST)
From:      Bruce Evans <bde@zeta.org.au>
To:        Tarasov Oleg <subscriber@osk.com.ua>
Cc:        freebsd-bugs@FreeBSD.org
Subject:   Re: sio interrupt-level buffer overflows
Message-ID:  <20050323235823.E19701@epsplex.bde.org>
In-Reply-To: <815955888.20050323113529@osk.com.ua>
References:  <815955888.20050323113529@osk.com.ua>

next in thread | previous in thread | raw e-mail | index | archive | help
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 <bde@zeta.org.au> 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



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