RFC genirq: Provide adaptive irq oneshot functionality
Get series with b4
b4 am [email protected]Versions newest first
- v1 RFC Latest4 patches 0 repliesNew
Patches in v1 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/4 | genirq: Globally serialize request/free_irqkernel/ | +18 | 0 replies | |
| 2/4 | genirq: Move action walk outside of desc->lock held regionkernel/ | +39 | 0 replies | |
| 3/4 | genirq: Add notification mechanism for adaptive shared irqsinclude/ kernel/ | +94 | 0 replies | |
| 4/4 | genirq: Add support for IRQF_COND_ONESHOTinclude/ kernel/ | +20 | 0 replies |
Reviews trailers per patch
No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.
Cover letter [RFC patch 0/4] genirq: Provide adaptive irq oneshot functionality
Warning: This is completely untested. Jan managed to confuse me even way beyond my base confusion level, so testing seems to be the appropriate reparation.
The final goal of these modifications is to allow an adaptive oneshot mode for possibly shared interrupts. If the interrupt is not shared then oneshot mode should be used as it is more efficient than masking/unmasking at the device level. When the interrupt becomes shared then the oneshot mode needs to be disabled and device level masking must be done.
That requires transitioning from one state to the other which needs the help of the interrupt handler of the device which asked for this feature.
This has been implemented before by Jan Kiszka in several iterations and I have to admit that I led Jan down the wrong road when I suggested to put the shared status into irq_data.
Seems my brain tricked me as I'm about to add a status field to irq_data for irq chips consumption, but of course that does not help interrupt handlers as they need to retrieve that information on every handler invocation, which is involves a radix tree lookup in the worst case.
Though avoiding the initialy proposed notifier ugliness in the first place and (ab^H^Hre)using the interrupt handler which has to be aware about the shared/non shared state already turned out to be a not too bad idea. Just my init idea sucked a bit.
Instead of retrieving irq_data we encode the shared state and the transition to it into the lower two bits of the dev_id pointer which is the second argument to the interrupt handler if and only if the driver requested the interrupt with the new IRQF_ADAPTIVE_SHARED flag set.
Thanks,
tglx