Re: IRQ handling

From: Tommy Thorn <tthorn%hof_at_nospam.org>
Date: Wed Mar 16 1994 - 05:05:00 PST

Andrew Valencia writes:

> >Thinking about it, I'm pretty sure that IRQ7 (and IRQ5 for lp2) must be
> >pretty reliable on a lot of systems, otherwise there'd be no chance of
> >getting PLIP links to work. I suspect that if Tommy Thorn's reading this he
> >can probably give some more details.
>
> No, it's not reliable on a large number of systems. All the software you
> see on DOS/Windoze machines for doing stuff over the LP port all handles
> this problem using timeouts, polls, and spin-loops.
>
> Andy

This is properly true, but how big is this large number? Plip does use
timeouts and spin-loops are implicit (the tcp protocol will retry for
you). Given that real-world performens is acceptable (~20Kb/s ftp),
and it doesn't kill the system when idle, I suspect that printer
interrupt works well enough to be a win on most architecture.

Even given the {Net,Free}BSD peoples experiences, one should try
both. If I get around to it, I'll replace the iret with and increment
of an integer, and check how many spurious interrupts I actually
get on the machines available to me.

> The nice thing about the iret stub is that I minimize the cost of taking
> these useless interrupts. Having to save all the state needed to go up
> into C source code would make this long-lived misfeature cost even more
> CPU cycles.

Why not just disable them instead? Why can the user level code decide
weather to use the interrupts or not. Someday I intend to do some
plip-like networking, and it requires the printer interrupt.
(plip works well on notebooks without ethernet cards).

/Tommy
Received on Wed Mar 16 05:26:03 1994

This archive was generated by hypermail 2.1.8 : Wed Sep 21 2005 - 21:02:16 PDT