[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20101215230352.411894017@linutronix.de>
Date: Wed, 15 Dec 2010 23:12:31 -0000
From: Thomas Gleixner <tglx@...utronix.de>
To: LKML <linux-kernel@...r.kernel.org>
Cc: Ingo Molnar <mingo@...e.hu>, Peter Zijlstra <peterz@...radead.org>,
Tom Lyon <pugs@...co.com>,
Alex Williamson <alex.williamson@...hat.com>,
"Michael S. Tsirkin" <mst@...hat.com>, Avi Kivity <avi@...hat.com>,
Marcelo Tosatti <mtosatti@...hat.com>,
Jan Kiszka <jan.kiszka@...mens.com>,
Jan Kiszka <jan.kiszka@....de>
Subject: [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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists