From: Linus Torvalds <torvalds@linux-foundation.org>
To: David Miller <davem@davemloft.net>
Cc: matthew@wil.cx, mingo@elte.hu, linux-kernel@vger.kernel.org
Subject: Re: IRQF_DISABLED problem
Date: Thu, 26 Jul 2007 16:04:42 -0700 (PDT) [thread overview]
Message-ID: <alpine.LFD.0.999.0707261557150.3442@woody.linux-foundation.org> (raw)
In-Reply-To: <20070726.152352.70218024.davem@davemloft.net>
On Thu, 26 Jul 2007, David Miller wrote:
> >
> > Another possibility is to force it if *any* of the handlers want
> > IRQF_DISABLED. This seems to work:
>
> Yes, this is consistent with how we handle sharing, we should
> enforce that all the flags on the chain are compatible.
No. It's no better than the current situation.
There are really a few choices:
(a) Keep it like we always have. What's the downside, really? It's what
we've got, it's what is tested.
(b) Enforce that flags match. This may sound logical, but it will
actually *break* existing setups, because tons of drivers set
IRQF_DISABLED for no good reason (probably all totally historical)
(c) "one IRQF_DISABLED means that everything runs disabled". This is
quite possibly buggy. There have been SCSI drivers with timeout
behaviour where they actually wait for timers to happen while in
their irq handlers. Bad form, and I *hope* we've fixed them all, but
I distinctly remember it being important that the timer had higher
priority than some SCSI drivers on some architecture.
(d) "one !IRFQ_DISABLED means that everything runs with irq's on". I
don't think it's any better than the other behaviour.
(e) Just ignore IRQF_DISABLED entirely when mixed with IRQF_SHARED,
because they're all pretty much guaranteed to be legacy and buggy and
pointless.
(f) Disable and re-enable interrupts per handler.
Quite frankly, my preference would be (a) followed by (e) or (f), and
(b)-(d) are in my opinion the worst of the lot with no upsides at all (and
(b) in particular is pretty much _guaranteed_ to break existing setups).
Linus
next prev parent reply other threads:[~2007-07-26 23:06 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-07-26 20:13 Matthew Wilcox
2007-07-26 20:41 ` Linus Torvalds
2007-07-26 22:23 ` David Miller
2007-07-26 23:04 ` Linus Torvalds [this message]
2007-07-26 23:14 ` David Miller
2007-07-26 23:17 ` Linus Torvalds
2007-07-27 20:11 ` Arjan van de Ven
2007-07-27 20:50 ` David Miller
[not found] <fa.mb8woD3e5JnT1x6AgEMOmnlVvg0@ifi.uio.no>
[not found] ` <fa.axY2ukp7kqKVMAidyu4NVN81MbI@ifi.uio.no>
[not found] ` <fa.tS+LCGnYgeCNRIaF90yH21XBCqI@ifi.uio.no>
[not found] ` <fa./08N/HtpJQ6zg8Xc1K5pP6/aKMM@ifi.uio.no>
2007-07-29 15:41 ` Robert Hancock
2007-08-02 15:40 ` Mark Lord
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=alpine.LFD.0.999.0707261557150.3442@woody.linux-foundation.org \
--to=torvalds@linux-foundation.org \
--cc=davem@davemloft.net \
--cc=linux-kernel@vger.kernel.org \
--cc=matthew@wil.cx \
--cc=mingo@elte.hu \
/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®