Messages in this thread | | | Date | Wed, 4 Jun 2008 23:07:52 +0100 (BST) | From | "Maciej W. Rozycki" <> | Subject | Re: [PATCH 0/7] Boot IRQ quirks and rerouting |
| |
On Wed, 4 Jun 2008, Jon Masters wrote:
> I disagree. I think it's now actually the *inverse*. It /used/ to be > harder, because you didn't have a context in which you could do many > things (so you need to schedule some kind of deferred work), but > actually, it'll become a lot more attractive with device threads.
Well, I mean it's easier to do all the handling sequentially in the hardirq context than split the thing and deal with all the communication, locking, possible races, etc. so people avoid it unless really forced to. In principle all the interrupt handlers could be split like this except those really, really tiny ones or where latency is absolutely critical. Yet it often does not happen.
> The only real caveat is for performance critical cases (the reasons we > have special softirqs and the like right now) but there will always be > special cases. Still, I'd like it if writing a Linux interrupt handler > came down to registering two functions - one lightweight tiny one, and > one that's just a thread. Much less room for making mistakes.
The two will have to pass some state between each other, might run concurrently or in parallel, etc. and require some effort to be written correctly.
Maciej
| |