mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Linus Torvalds <torvalds@osdl.org>
To: Alan Cox <alan@redhat.com>
Cc: Arjan van de Ven <arjan@infradead.org>,
	Stephen Hemminger <shemminger@osdl.org>,
	Andrew Morton <akpm@osdl.org>,
	linux-kernel@vger.kernel.org
Subject: Re: better leve triggered IRQ management needed
Date: Mon, 24 Apr 2006 15:26:01 -0700 (PDT)	[thread overview]
Message-ID: <Pine.LNX.4.64.0604241521210.3701@g5.osdl.org> (raw)
In-Reply-To: <20060424212038.GC4942@devserv.devel.redhat.com>



On Mon, 24 Apr 2006, Alan Cox wrote:
> 
> > The fake interrupt could even print out a warning if somebody returns 
> > SA_HANDLED (since normally there _shouldn't_ have been any work to handle 
> > for it), and if that means that for somebody, things go from "the machine 
> > hung" to "the machine got very slow, and printed out 'fake interrupt for 
> > ide0 returned SA_HANDLED!'", that would potentially be a big debug aid.
> 
> There are high rate IRQ sources that would trigger that erratically due to
> races but it could be useful in some kind of "linux irqdebug" mode

I was thinking that an interrupt actually happening on that irq would set 
the "already done" flag, so that if it's a high-rate irq, then we'd not 
inject any new fake ones.

So the algorithm would be something like "clear the 'already done' flag 
every five seconds, and sending the fake one if it was already cleared", 
with normal interrupts always setting the flag.

And yes, you could still hit it in a blue moon (nothing happened for five 
seconds, and then it happens _just_ as we send a fake event), but if the 
only thing we do is do a printk() on it, no big deal if you get a false 
positive every five years.

(The bigger problem is that some drivers just return IRQ_HANDLED whether 
they had work to do or not, because people - including me - were lazy in 
some of the conversion of the irq_handler_t stuff).

I dunno. It _sounds_ simple enough..

			Linus

  reply	other threads:[~2006-04-24 22:26 UTC|newest]

Thread overview: 33+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-04-24 18:41 Stephen Hemminger
2006-04-24 18:59 ` linux-os (Dick Johnson)
2006-04-24 19:02 ` Linus Torvalds
2006-04-24 19:08   ` Linus Torvalds
2006-04-24 19:53     ` Arjan van de Ven
2006-04-24 20:16       ` Alan Cox
2006-04-24 20:43         ` Arjan van de Ven
2006-04-24 21:07           ` Linus Torvalds
2006-04-24 21:20             ` Alan Cox
2006-04-24 22:26               ` Linus Torvalds [this message]
2006-04-24 21:22             ` [RFC 1/2] irq: record edge-level setting Stephen Hemminger
2006-04-24 21:49               ` Alan Cox
2006-04-24 21:41                 ` Stephen Hemminger
2006-04-24 22:34                   ` Linus Torvalds
2006-04-24 22:58                     ` Stephen Hemminger
     [not found]             ` <20060424141926.3872f921@localhost.localdomain>
2006-04-24 21:22               ` [RFC 2/2] warn on shared edge-triggered irq Stephen Hemminger
2006-04-25 15:23             ` better leve triggered IRQ management needed Michael Buesch
2006-04-24 19:15   ` Russell King
2006-04-24 20:18     ` Linus Torvalds
2006-04-24 19:25   ` Stephen Hemminger
2006-04-24 19:35   ` linux-os (Dick Johnson)
2006-04-24 20:19     ` Linus Torvalds
2006-04-24 20:50       ` linux-os (Dick Johnson)
2006-04-24 21:09         ` Linus Torvalds
2006-04-29 21:25 ` Alan Cox
2006-04-29 21:58   ` Linus Torvalds
2006-04-30  4:48     ` Neil Brown
2006-04-30  5:19       ` Linus Torvalds
2006-04-30  6:13         ` Neil Brown
2006-04-30  6:59           ` Linus Torvalds
2006-05-02  5:10             ` Neil Brown
2006-05-02 15:05               ` Linus Torvalds
2006-04-30  7:36       ` Arjan van de Ven

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=Pine.LNX.4.64.0604241521210.3701@g5.osdl.org \
    --to=torvalds@osdl.org \
    --cc=akpm@osdl.org \
    --cc=alan@redhat.com \
    --cc=arjan@infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=shemminger@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

all inboxes | Powered by JetHome®