From: Esben Haabendal <esbenhaabendal@gmail.com>
To: Marc Zyngier <maz@misterjones.org>
Cc: Thomas Gleixner <tglx@linutronix.de>,
Esben Haabendal <eha@doredevelopment.dk>,
linux-kernel@vger.kernel.org, mingo@elte.hu,
joachim.eastwood@jotron.com
Subject: Re: [RFC][PATCH] irq: support IRQ_NESTED_THREAD with non-threaded interrupt handlers
Date: Sat, 5 Jun 2010 21:38:20 +0200 [thread overview]
Message-ID: <AANLkTimqTQ9FbewtwoVZiwinPFne8MWPowuJDjMgODW2@mail.gmail.com> (raw)
In-Reply-To: <20100605181816.7aae71c7@hina.wild-wind.fr.eu.org>
>> What is the plan here, should all drivers change from
>> request_any_context_irq() at some point in time?
>
> All? Probably not. Only the few where the need arises, and after carefully
> checking that you're not introducing a horrible race condition somewhere
> (threaded handlers are running with interrupts enabled...).
Yes, and that is exactly one of the issues I wanted to address with the patch.
If you have a driver which uses an interrupt handler, which is designed
and tested in interrupt context, you really have to take care before turning
it into a threaded interrupt handler.
But if you have a slow interrupt controller which uses nested threaded
interrupt handler, then it should be safe to let the interrupt handler
run within the interrupt controllers thread, but with interrupts disabled.
Yes, it is propably better to rewrite the handler to be able to run
threaded, but the same could be said without the slow interrupt
handler. So unless all interrupt handlers should be rewritten
as threaded handlers, I don't see why it should not be possible
to just run a non-threaded interrupt handler, in a threaded
interrupt controllers thread, but with interrupts disabled.
Carefully checking for horrible race condition in a driver that you
really did not otherwise needed to work on is asking for
quite a bit, and I fear that this approach is doomed to actually
cause the horrible race conditions, because the checking
will be done by people without sufficient insight in the driver
in question.
/Esben
--
Esben Haabendal, Senior Software Consultant
DoréDevelopment ApS, Ved Stranden 1, 9560 Hadsund, DK-Denmark
Phone: +45 51 92 53 93, E-mail: eha@doredevelopment.dk
WWW: http://www.doredevelopment.dk
prev parent reply other threads:[~2010-06-05 19:38 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-06-04 21:19 Esben Haabendal
2010-06-04 21:46 ` Thomas Gleixner
2010-06-05 13:56 ` Esben Haabendal
2010-06-05 14:10 ` Marc Zyngier
2010-06-05 15:33 ` Thomas Gleixner
2010-06-05 17:01 ` Esben Haabendal
2010-06-05 18:52 ` Thomas Gleixner
2010-06-05 19:48 ` Esben Haabendal
2010-06-05 20:14 ` Thomas Gleixner
2010-06-06 19:50 ` Esben Haabendal
2010-06-06 22:08 ` Thomas Gleixner
2010-06-07 12:34 ` Esben Haabendal
2010-06-07 15:06 ` Thomas Gleixner
2010-06-07 21:28 ` Esben Haabendal
2010-06-07 23:18 ` Thomas Gleixner
2010-06-08 14:15 ` Esben Haabendal
2010-06-08 6:58 ` Thomas Gleixner
2010-06-08 7:23 ` Esben Haabendal
2010-06-05 16:53 ` Esben Haabendal
2010-06-05 17:18 ` Marc Zyngier
2010-06-05 19:38 ` Esben Haabendal [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=AANLkTimqTQ9FbewtwoVZiwinPFne8MWPowuJDjMgODW2@mail.gmail.com \
--to=esbenhaabendal@gmail.com \
--cc=eha@doredevelopment.dk \
--cc=joachim.eastwood@jotron.com \
--cc=linux-kernel@vger.kernel.org \
--cc=maz@misterjones.org \
--cc=mingo@elte.hu \
--cc=tglx@linutronix.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®