mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [RFC patch 0/4] genirq: Provide adaptive irq oneshot functionality
@ 2010-12-15 23:12 Thomas Gleixner
  2010-12-15 23:12 ` [RFC patch 1/4] genirq: Globally serialize request/free_irq Thomas Gleixner
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: Thomas Gleixner @ 2010-12-15 23:12 UTC (permalink / raw)
  To: LKML
  Cc: Ingo Molnar, Peter Zijlstra, Tom Lyon, Alex Williamson,
	Michael S. Tsirkin, Avi Kivity, Marcelo Tosatti, Jan Kiszka,
	Jan Kiszka

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



^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2010-12-15 23:13 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-12-15 23:12 [RFC patch 0/4] genirq: Provide adaptive irq oneshot functionality Thomas Gleixner
2010-12-15 23:12 ` [RFC patch 1/4] genirq: Globally serialize request/free_irq Thomas Gleixner
2010-12-15 23:12 ` [RFC patch 2/4] genirq: Move action walk outside of desc->lock held region Thomas Gleixner
2010-12-15 23:12 ` [RFC patch 3/4] genirq: Add notification mechanism for adaptive shared irqs Thomas Gleixner
2010-12-15 23:12 ` [RFC patch 4/4] genirq: Add support for IRQF_COND_ONESHOT Thomas Gleixner

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

Powered by JetHome