From owner-freebsd-current@FreeBSD.ORG Sat May 1 00:43:39 2004 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id DC3E516A4CF for ; Sat, 1 May 2004 00:43:39 -0700 (PDT) Received: from Reineke.Malepartus.de (reineke.malepartus.de [194.25.4.41]) by mx1.FreeBSD.org (Postfix) with ESMTP id B380543D31 for ; Sat, 1 May 2004 00:43:38 -0700 (PDT) (envelope-from bm@Reineke.Malepartus.de) Received: from Reineke.Malepartus.de (localhost [127.0.0.1]) i417haaK002052; Sat, 1 May 2004 09:43:36 +0200 (CEST) (envelope-from bm@Reineke.Malepartus.de) Received: (from bm@localhost) by Reineke.Malepartus.de (8.12.11/8.12.11/Submit) id i417hWhg002051; Sat, 1 May 2004 09:43:32 +0200 (CEST) (envelope-from bm) Date: Sat, 1 May 2004 09:43:32 +0200 From: Burkard Meyendriesch To: Bruce Evans Message-Id: <20040501094332.49356c55.bm@malepartus.de> In-Reply-To: <20040501140658.F19558@gamplex.bde.org> References: <20040426111754.38a855c4.bm@malepartus.de> <20040426233925.Y5300@gamplex.bde.org> <20040430102504.477152ce.bm@malepartus.de> <20040501140658.F19558@gamplex.bde.org> Organization: The Home of Reineke Fuchs X-Mailer: Sylpheed version 0.9.10 (GTK+ 1.2.10; amd64-portbld-freebsd5.2) X-Face: "[-; ]oI+8gP9>*J%knDN8d%DuhvJS2Lj4L\bRb7gz(pcT?2Zh6_Vam_6csAum3$<&lhAFd^ jt|!&Ut1C~Vg*E/q}+#cbFg-GU]c.bB8Ad,L'W$'9{^0y'AzM4#hS[C[F-1'|O; Kg3Vrq5q6dsU*TmJ@}+QPM\ b[^9Rhd,UoMpRpd5k[X=h.Dom*kbT`cNQ Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit cc: freebsd-current@FreeBSD.org Subject: Re: sio: lots of silo overflows on Asus K8V with Moxa Smartio C104H/PCI X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 01 May 2004 07:43:40 -0000 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 > @@ -1162,5 +1302,6 @@ > 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: 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: 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