From owner-freebsd-current@FreeBSD.ORG Mon Aug 2 13:06:02 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 D368F16A4CE for ; Mon, 2 Aug 2004 13:06:02 +0000 (GMT) Received: from mta03-svc.ntlworld.com (mta03-svc.ntlworld.com [62.253.162.43]) by mx1.FreeBSD.org (Postfix) with ESMTP id D5CCC43D48 for ; Mon, 2 Aug 2004 13:06:01 +0000 (GMT) (envelope-from antony.t.curtis@ntlworld.com) Received: from [10.10.10.100] ([81.107.87.144]) by mta03-svc.ntlworld.com (InterMail vM.4.01.03.37 201-229-121-137-20020806) with ESMTP id <20040802130418.DFZL291.mta03-svc.ntlworld.com@[10.10.10.100]> for ; Mon, 2 Aug 2004 14:04:18 +0100 From: Antony T Curtis To: freebsd-current@freebsd.org In-Reply-To: References: Content-Type: text/plain Message-Id: <1091451938.53960.13.camel@pcgem.rdg.cyberkinetica.com> Mime-Version: 1.0 X-Mailer: Ximian Evolution 1.4.4 Date: Mon, 02 Aug 2004 14:05:38 +0100 Content-Transfer-Encoding: 7bit Subject: Re: LPT interruptstorm 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: Mon, 02 Aug 2004 13:06:03 -0000 On Mon, 2004-08-02 at 13:10, Ian FREISLICH wrote: > "Willem Jan Withagen" wrote: > > From: "Ian FREISLICH" > > > "Willem Jan Withagen" wrote: > > > > Hi, > > > > > > > > Must be a FAQ, but I did not find anything ... > > > > > > > > When wanting to print thru /dev/lpt0 the kernel now starts to > > > > complain about interruptstorms. Something I can imagine, since > > > > printing can generate > 1000 ints/sec. Problem is that the > > > > current document (500k) is now printed at 100 interrupts/sec. > > > > > > > > That's going to take some time.... > > > > How do I prevent this from happening? > > > > > > /etc/sysctl.conf: hw.intr_storm_threshold=2000 > > > > > > OR > > > > > > /boot/device.hints: hint.ppc.0.flags="0x8" > > > > > > Make sure your bios is set to ecp/epp for the printer port, or the > > > second option will fail. A couple of people around here have also > > > suggested 'lptcontrol -e', but every time I've tried that (even with > > > lpd stopped) I get 'lptcontrol: open: Device busy'. I'm not sure > > > what keeps the printer port open other than lpd. > > > > Setting the sysctl worked. But now watching it with sysstat, I see > > that the interrupts go up as high as 65.000 ???? > > Yes, I was seeing ~43000/second on my PII. If you set the hint, I > think it will use DMA to do the transfer with periodic interrupts > to fill the buffer. For ECP, I think you would have to set a hint for DMA for it to work - this is often configurable in the BIOS or may default to DMA 3 IIRC, EPP mode does have a 16 byte FIFO available which would also help for those who cannot get ECP working. I think within the next year or so, the venerable parallel port may go away - replaced by USB. Long live the parallel port. -- Antony T Curtis, BSc. UNIX, Linux, *BSD, Networking antony.t.curtis@ntlworld.com C++, J2EE, Perl, MySQL, Apache IT Consultancy.