From: Jamie Lokier <jamie@shareable.org>
To: Nicolas Pitre <nico@fluxnic.net>
Cc: Peter Zijlstra <peterz@infradead.org>,
Alan Cox <alan@lxorguk.ukuu.org.uk>, Ingo Molnar <mingo@elte.hu>,
Thomas Gleixner <tglx@linutronix.de>,
Linus Torvalds <torvalds@osdl.org>,
LKML <linux-kernel@vger.kernel.org>,
linux-arch@vger.kernel.org,
Andrew Morton <akpm@linux-foundation.org>,
Andi Kleen <andi@firstfloor.org>,
David Miller <davem@davemloft.net>,
Greg Kroah-Hartman <gregkh@suse.de>,
Arnaldo Carvalho de Melo <acme@redhat.com>,
Russell King <rmk@arm.linux.org.uk>
Subject: Re: [patch 0/2] Run interrupt handlers always with interrupts disabled
Date: Fri, 26 Mar 2010 12:06:20 +0000 [thread overview]
Message-ID: <20100326120620.GD19308@shareable.org> (raw)
In-Reply-To: <alpine.LFD.2.00.1003260756540.694@xanadu.home>
Nicolas Pitre wrote:
> On Fri, 26 Mar 2010, Peter Zijlstra wrote:
>
> > On Fri, 2010-03-26 at 09:59 +0000, Alan Cox wrote:
> > > > As long as it's rare (which it is) i dont see a problem: you can enable
> > > > interrupts in the handler by using local_irq_enable(), like the IDE PIO
> > > > drivers do. That way it's documented a bit better as well, because it shows
> > > > the precise source of the latency, with a big comment explaining it, etc.
> > >
> > > I don't think it's as rare as you think particularly in embedded, and the
> > > moment you start explicitly using local_irq_enable() you've simply moved
> > > the underlying problem back and made it far harder to grep for.
> >
> > We've got local_irq_enable_in_hardirq() which should be used and can
> > easily be grep'ed for.
> >
> > But yes, I would much prefer to simply convert these known slow handlers
> > to threaded interrupts.
>
> Can't do that. The smc91x has a very small internal buffer which has to
> be emptied using PIO. Threaded interrupts simply have too high
> latencies for overruns not to occur. That's why the RX path is entirely
> done in hardirq context while the TX path is done in softirq context.
Although I wouldn't be surprised to find threaded interrupts are too
slow on certain hardware, is that _fundamental_ to threaded
interrupts, or is it just that our implementation doesn't have the
funky hot path straight direct from hardirq -> running high priority
RT irq thread when it exceeds previously running priority?
In other words, can we swizzle threaded irqs into something more
resembling software-implemented hard irq priorities, while cunningly
updating the kernel state just enough to look like it's a thread?
-- Jamie
prev parent reply other threads:[~2010-03-26 12:06 UTC|newest]
Thread overview: 32+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-03-26 0:06 [patch 0/2] Run interrupt handlers always with interrupts disabled Thomas Gleixner
2010-03-26 0:06 ` [patch 1/2] genirq: Run irq handlers " Thomas Gleixner
2010-03-26 6:13 ` Andi Kleen
2010-03-26 13:05 ` Thomas Gleixner
2010-03-30 5:33 ` Andi Kleen
2010-03-31 11:16 ` Thomas Gleixner
2010-04-02 9:31 ` Pavel Machek
2010-04-02 20:42 ` Thomas Gleixner
2010-04-02 21:09 ` Pavel Machek
2010-04-02 21:31 ` Peter Zijlstra
2010-04-02 22:51 ` Thomas Gleixner
2010-04-03 4:45 ` Pavel Machek
2010-04-03 4:45 ` Pavel Machek
2010-05-25 20:32 ` Venkatesh Pallipadi
2010-03-26 0:06 ` [patch 2/2] genirq: Remove IRQF_DISABLED from core code Thomas Gleixner
2010-03-26 0:06 ` Thomas Gleixner
2010-03-26 6:20 ` Andi Kleen
2010-03-26 11:19 ` Thomas Gleixner
2010-03-26 11:19 ` Thomas Gleixner
2010-03-26 3:34 ` [patch 0/2] Run interrupt handlers always with interrupts disabled David Miller
2010-03-26 8:14 ` Russell King
2010-03-26 8:14 ` Russell King
2010-03-26 9:20 ` Ingo Molnar
2010-03-26 9:20 ` Ingo Molnar
2010-03-26 9:28 ` Peter Zijlstra
2010-03-26 12:02 ` Jamie Lokier
2010-03-26 9:59 ` Alan Cox
2010-03-26 10:08 ` Peter Zijlstra
2010-03-26 10:12 ` Andi Kleen
2010-03-26 10:53 ` Ingo Molnar
2010-03-26 12:00 ` Nicolas Pitre
2010-03-26 12:06 ` Jamie Lokier [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=20100326120620.GD19308@shareable.org \
--to=jamie@shareable.org \
--cc=acme@redhat.com \
--cc=akpm@linux-foundation.org \
--cc=alan@lxorguk.ukuu.org.uk \
--cc=andi@firstfloor.org \
--cc=davem@davemloft.net \
--cc=gregkh@suse.de \
--cc=linux-arch@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=nico@fluxnic.net \
--cc=peterz@infradead.org \
--cc=rmk@arm.linux.org.uk \
--cc=tglx@linutronix.de \
--cc=torvalds@osdl.org \
/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;
as well as URLs for NNTP newsgroup(s).