Re: [PATCH 2.6.16] Shared interrupts sometimes lost



On Saturday April 8, rlrevell@xxxxxxxxxxx wrote:
On Sat, 2006-04-08 at 14:10 +1000, Neil Brown wrote:

To explain what I think is happening, let me start with a very simple
case. A number of PCI devices (this one included) have a number of
events which can trigger an interrupt. The events which are current
are presented as bits in a register, and are ORed together (and
possibly masked by another register) to make the IRQ line.
When 1's are written to any bits in this register, it acknowledges
the event and clears the bit.
A typical code fragment is
events = read_register(INTERRUPTS);
write_register(INTERRUPTS, events);
... handle each 1 bits in events ....


Isn't a more typical IRQ handler:

while (events = read_register(INTERRUPTS) != 0) {
...handle each bit in events and ACK it...
}

Maybe... I admit that I generalised from 2 examples: rt2500 and yenta.
However I don't think it makes a big difference to the problem with
shared interrupts (assuming my analysis is right).

The loop isn't really necessary if you are sure that unserviced
interrupts will be re-asserted (as level-triggered interrupts would
be) (though it may still help performance) and the loop isn't
sufficient if you need to be sure that all events get services (as
there may be more in the shared-chain).

Thanks,
NeilBrown
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/



Relevant Pages

  • [PATCH] FRV: Use virtual interrupt disablement
    ... The attached patch makes the FRV arch use virtual interrupt disablement because ... time (separate h/w and inter-core interrupts). ... inside the kernel. ... flag out of the CCR register, shifting it down and masking it off. ...
    (Linux-Kernel)
  • RE: [patch 1/2] serial: add tsi108 8250 serial support
    ... The following patch fixes the tsi108 port report information. ... UPIO_TSI to handle IIR and IER register in serial_in and serial_out. ... Empty and Transmit buffer Empty interrupts ... driver specific */ ...
    (Linux-Kernel)
  • Re: Xilinx Virtex-4 OCM Usage Issues
    ... correct and then register 5 is copied into register 6. ... anything about how interrupts work on the PPC, so I'll have to read up ... Since Ben mentioned interrupts a couple of times, and you say this, let ... and also mentioned in the OS and Libraries Documentation, ...
    (comp.arch.fpga)
  • [Patch 06/08] Staging: heci - fix setting h_is bit in h_csr register
    ... Subject: [PATCH] heci: fix setting h_is bit in h_csr register. ... Host software could issue interrupts to ME firmware, ... host software should preserve all the other bits in H_CSR ...
    (Linux-Kernel)
  • Re: Is a small performance improvement on Minix3 scheduler (function enqueue) possible?
    ... with "register" keyword to store them in registers instead of stack. ... so that means 125 clock interrupts per seconds. ... If we manage to save 50 cycles each scheduler ... the performance gain is still a fraction of a percent. ...
    (comp.os.minix)