Re: LPT interruptstorm

From: Antony T Curtis <antony.t.curtis_at_ntlworld.com>
Date: Mon, 02 Aug 2004 14:05:38 +0100
On Mon, 2004-08-02 at 13:10, Ian FREISLICH wrote:
> "Willem Jan Withagen" wrote:
> > From: "Ian FREISLICH" <if_at_hetzner.co.za>
> > > "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_at_ntlworld.com            C++, J2EE, Perl, MySQL, Apache
                                        IT Consultancy.
Received on Mon Aug 02 2004 - 11:06:02 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:38:04 UTC