Re: SMP safe driver with 2.0.36

Alan Cox (alan@lxorguk.ukuu.org.uk)
Fri, 26 Mar 1999 00:54:07 +0000 (GMT)


> this work fine without losing any interrupt on a P100. It does also
> work on a PII 450 MHz with 2.0.36 UP. The problem is when I switched
> to 2.0.36 SMP on a dual PII 450 MHz. From time to time, I lose an
> interrupt. And if I don't acknowledge the interrupt, the card stops
> sending them. So the transmission stops.

Losing it is a bit worrying, You might miss some interrupts in the sense
of taking > 1/4000th of a second to service them but it shouldnt miss any.

> -When using bottom half in the immediate queue, does the bh function
> executes really quickly after the interrupt handler with SMP kernel ?

if you mark_bh(IMMEDIATE_BH)

> -And does the kernel executes 2 instances of the bh function (if it was
> marked twice by the interrupt handler) on a SMP kernel ?

If it is marked twice and not running then it will execute once only. If
it is running then further mark_bh() calls will ensure it is run once
again.

> -Should the bh function disable interrupts (I don't think so, since
> this would be doing the same as the interrupt handler...)

No

> -With interrupts disabled (save_flags(flags); cli();), are the
> interrupts queued by the kernel and distributed once the interrupts
> are re-enabled (restore_flags(flags);) or they are dumped into
> emptiness ?

They interrupt status is left queued. There is no guarantee that 4000
interrupts/second will produce 4000 irq's second - if any irq is pending
then it wont get raised twice - its just a signal on a bus.

Alan

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/