Re: IRQF_DISABLED problem

!MAILaRCHIVE_VOTE_RePLACE
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: David Miller <davem@...>
Cc: <matthew@...>, <mingo@...>, <linux-kernel@...>
Date: Thursday, July 26, 2007 - 7:04 pm

On Thu, 26 Jul 2007, David Miller wrote:

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
-
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
IRQF_DISABLED problem, Matthew Wilcox, (Thu Jul 26, 4:13 pm)
Re: IRQF_DISABLED problem, Linus Torvalds, (Thu Jul 26, 4:41 pm)
Re: IRQF_DISABLED problem, David Miller, (Thu Jul 26, 6:23 pm)
Re: IRQF_DISABLED problem, Linus Torvalds, (Thu Jul 26, 7:04 pm)
Re: IRQF_DISABLED problem, Linus Torvalds, (Thu Jul 26, 7:17 pm)
Re: IRQF_DISABLED problem, Arjan van de Ven, (Fri Jul 27, 4:11 pm)
Re: IRQF_DISABLED problem, David Miller, (Fri Jul 27, 4:50 pm)
Re: IRQF_DISABLED problem, David Miller, (Thu Jul 26, 7:14 pm)