Re: sio: lots of silo overflows on Asus K8V with Moxa Smartio C104H/PCI

From: Burkard Meyendriesch <bm_at_malepartus.de>
Date: Sat, 1 May 2004 09:43:32 +0200
On Sat, 1 May 2004 14:23:13 +1000 (EST) Bruce Evans wrote:

> On Fri, 30 Apr 2004, Burkard Meyendriesch wrote:
> 
> > On Mon, 26 Apr 2004 23:48:46 +1000 (EST) Bruce Evans wrote:
> >
> > > On Mon, 26 Apr 2004, Burkard Meyendriesch wrote:
> > >
> > > > on my Asus K8V with Moxa Smartio C104H/PCI I get lots of silo
> > > > overflows when backing up my Palm over a serial line, even at
> > > > 19.200 baud.
> > > >
> > > > What's going wrong here? And what can I do?
> > > > ...
> > >
> > > You seem to have trimmed too much from the boot messages (I
> > > trimmed the rest).  sio5 is not there.
> > > ...
> > Sorry, I forgot to send the sio's boot message (I forgot it because
> > it didn't say anything in boot -v mode). Here are the boot messages:
> > ...
> 
> Not using a fast interrupt handler may cause occasional silo
> overflows, but shouldn't cause many.  The problem is mostly elsewhere
> (Giant locking for too long), but siointr() shouldn't use Giant
> locking.  Try the following patch if you still have shared interrupts:
> 
> %%%
> Index: sio.c
> ===================================================================
> RCS file: /home/ncvs/src/sys/dev/sio/sio.c,v
> retrieving revision 1.427
> diff -u -2 -r1.427 sio.c
> --- sio.c	7 Apr 2004 21:56:20 -0000	1.427
> +++ sio.c	21 Apr 2004 14:20:17 -0000
> _at__at_ -1162,5 +1302,6 _at__at_
>  		if (ret) {
>  			ret = BUS_SETUP_INTR(device_get_parent(dev), dev,
> -					     com->irqres, INTR_TYPE_TTY,
> +					     com->irqres,
> +					     INTR_TYPE_TTY | INTR_MPSAFE,
>  					     siointr, com, &com->cookie);
>  			if (ret == 0)
> %%%
> 
> I don't expect this to fix your problem.

Thank you for the patch! I just installed it in a new kernel. Result:

/var/log/messages after boot -v:
..
May  1 09:07:31 Reineke kernel: puc0: <Moxa Technologies, Smartio C104H/PCI> port 0xa000-0xa00f,0xa400-0xa43f,0xa800-0xa87f irq 19 at device 14.0 on pci0
May  1 09:07:31 Reineke kernel: puc0: Reserved 0x40 bytes for rid 0x18 type 4 at 0xa400
May  1 09:07:31 Reineke kernel: sio4: <Moxa Technologies, Smartio C104H/PCI> on puc0
May  1 09:07:31 Reineke kernel: sio4: type 16550A
May  1 09:07:31 Reineke kernel: sio4: unable to activate interrupt in fast mode - using normal mode
..

> 
> > By the way: How should I set the BIOS parameters "PCPI 2.0 yes/no"
> > and"ACPI APIC yes/no"? Do they have anything to do with the PCI
> > interrupt behaviour?
> 
> Configuring APIC (and ACPI if necessary for APIC to work) in both the
> BIOS and FreeBSD is good for minimising shared interrupts.  You seem
> to already have APIC (non-APIC interrupt numbers only go up to 15, but
> you have #19).
> 
> OTOH, using the APIC may cause problems (interrupt storms), especially
> for interrupt numbers > 15.  FreeBSD now has interrupt storm avoidance
> to prevent storms from making the whole system unusable, but interrupt
> storm avoidance for irq19  would cause your problem.  It rate-limits
> the interrupt to 10Hz, but even low speeds like 19200 require much
> more than that even on buffered UARTs:
>
My Hardware is an Asus K8V Athlon64 board; in my BIOS I enabled "ACPI 2.0"
and "ACPI APIC".
> 
>     19200 bps = 1920 cps = at least 1920/16 = 120 interrupts/second
> 
> Here 16 is the input fifo size for the usual case of a 16550A UART.
> Use systat -v to see the transient interrupt rate.
> 
At 115200 bps my puc interrupt rate is at about 300 ints/s, but I see
peeks up to 1500 ints/s. iostat 10 gives me an average char input rate
of 2300 chars/s. The silo overflow rate is about 1 per 5 seconds.

At 9600 bps the puc interrupt rate is about 105 ints/s with 730 char/s
input character rate. At this low speed I don't see any silo overflows.

Btw, systat -v shows a constant high interrupt rate of 1024 0: clk;
is this normal?
 
Burkard

--
Burkard Meyendriesch
Stevern 2
D-48301 Nottuln
Received on Fri Apr 30 2004 - 22:43:39 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:37:52 UTC