From: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
To: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Peter Zijlstra <peterz@infradead.org>,
Ingo Molnar <mingo@elte.hu>, Thomas Gleixner <tglx@linutronix.de>,
lkml <linux-kernel@vger.kernel.org>,
linux-arch <linux-arch@vger.kernel.org>,
Andrew Morton <akpm@linux-foundation.org>
Subject: Re: [RFC][PATCH] irq: remove IRQF_DISABLED
Date: Mon, 2 Mar 2009 19:48:51 +0100 [thread overview]
Message-ID: <200903021948.51500.bzolnier@gmail.com> (raw)
In-Reply-To: <alpine.LFD.2.00.0903021012080.3111@localhost.localdomain>
On Monday 02 March 2009, Linus Torvalds wrote:
>
> On Mon, 2 Mar 2009, Bartlomiej Zolnierkiewicz wrote:
> > >
> > > Could we make just the IDE driver itself enable interrupts? Sure. But that
> >
> > Actually it has been doing it for years (some host drivers don't do this by
> > default and still need "hdparm -u" or equivalent but I was planning to change
> > it for 2.6.30).
>
> The IDE layer has the option to enable irq's during the transfer itself,
> yes. But it actually works the reverse way from what you think: the irq
Hmm, I said nothing about how it is implemented in the IDE code itself. :)
> layer will enable interrupts, and the IDE layer will then _not_ disable
> them during the transfer if you use "hdparm -u".
>
> Look at ide_intr: it generally gets called with interrupts _enabled_
> (because it doesn't use IRQF_DISABLED) and then it does:
>
> spin_lock_irqsave(&hwif->lock, flags);
> ..
> spin_unlock(&hwif->lock);
> ..
> if (drive->dev_flags & IDE_DFLAG_UNMASK)
> local_irq_enable_in_hardirq();
> ...
> spin_lock_irq(&hwif->lock);
> ...
> spin_unlock_irqrestore(&hwif->lock, flags);
>
> where the magic thing is how it enables irqs again if the "irq unmask"
> flag is set.
>
> The point I'm making is that
>
> - as far as the generic irq layer is concerned, IDE might as well have
> interrupts enabled all the time (and disabling them is a local issue,
> more to do with locking and with timing-induced hardware _bugs_ rather
> than anything else)
>
> - .. and more importantly, that is AS IT MUST BE. Because quite frankly,
> if the irq handler enables interrupts (like IDE does), the generic IRQ
> layer really _must_ know about it, because it may depend on
> non-reentrancy of that interrupt.
Fixing this is on long-term TODO (there was just a ton of more high-prio
stuff to take care of first).
Thanks,
Bart
next prev parent reply other threads:[~2009-03-02 18:48 UTC|newest]
Thread overview: 31+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-03-02 12:21 [RFC][PATCH] irq: remove IRQF_DISABLED Peter Zijlstra
2009-03-02 14:43 ` Ingo Molnar
2009-03-02 15:47 ` Matthew Wilcox
2009-03-02 15:59 ` Peter Zijlstra
2009-03-02 16:32 ` Matthew Wilcox
2009-03-02 21:01 ` Russell King
2009-03-02 21:17 ` Ingo Molnar
2009-03-02 21:17 ` Ingo Molnar
2009-03-02 17:11 ` Linus Torvalds
2009-03-02 17:55 ` Bartlomiej Zolnierkiewicz
2009-03-02 18:02 ` Peter Zijlstra
2009-03-02 18:07 ` Peter Zijlstra
2009-03-02 18:27 ` Bartlomiej Zolnierkiewicz
2009-03-02 18:29 ` Linus Torvalds
2009-03-02 18:48 ` Bartlomiej Zolnierkiewicz [this message]
2009-03-02 19:06 ` Linus Torvalds
2009-03-02 19:18 ` Bartlomiej Zolnierkiewicz
2009-03-02 17:56 ` Peter Zijlstra
2009-03-02 18:45 ` Vadim Lobanov
2009-03-02 18:54 ` Linus Torvalds
2009-03-05 15:40 ` Mark Lord
2009-03-02 21:17 ` Alan Cox
2009-03-06 8:58 ` Benjamin Herrenschmidt
2009-03-06 9:12 ` Peter Zijlstra
2009-03-06 9:59 ` Benjamin Herrenschmidt
2009-03-06 10:05 ` Benjamin Herrenschmidt
2009-03-06 10:24 ` Peter Zijlstra
2009-03-06 17:02 ` Peter Zijlstra
2009-03-06 21:40 ` Benjamin Herrenschmidt
2009-03-02 17:55 ` Andrew Morton
2009-03-02 18:10 ` Peter Zijlstra
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=200903021948.51500.bzolnier@gmail.com \
--to=bzolnier@gmail.com \
--cc=akpm@linux-foundation.org \
--cc=linux-arch@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=peterz@infradead.org \
--cc=tglx@linutronix.de \
--cc=torvalds@linux-foundation.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.