login
Header Space

 
 

Re: Interrupt, interrupt threads, continuations, and kernel lwps

Score:
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: Andrew Doran <ad@...>
Cc: Matt Thomas <matt@...>, <tech-kern@...>
Date: Wednesday, February 21, 2007 - 1:50 pm

On Wed, Feb 21, 2007 at 10:09:00AM +0000, Andrew Doran wrote:
=20

Funny, I was talking w/ Jason and Matt about this yesterday at Lunch.

There are two problems. Vax has both of them, and m68k has at least one of=
=20
them.

One problem is that some systems, like vax, are modal. There's a=20
difference running something in interrupt handling context and not. Matt=20
noted that the vax has separate interrupt stacks. So interrupt code is=20
more than just code running quickly (low latency) at high priority.

The other problem, which I know mac68k has too, is that you have to make=20
the hardware shut up as part of the interrupt handling. Otherwise once you=
=20
exit the interrupt, you'll just reenter it. So you have to have interrupts=
=20
remain disabled until this interupt handling thread completes. That's not=
=20
what is in my mind as a result of this discussion so far.

=20
=20
=20
ike
ur

So how would this work on other architectures?

ts:
ain
is,

I think a good model would be something like how the z8530tty driver works
but dusted off. There is a hard interrupt handler that reads the chip. On
receive, it stuffs characters into a ring buffer and then triggers a soft
interrupt. Transmit, it stuffs characters into the chip.

Either way, the hard interrupt handler is small and just does pseudodma. A=
=20
software interrupt handling routine then comes along and does the heavy=20
lifting.

I really like the idea of the latter routine being a thread & using=20
mutexes. The former, though, I think should remain a fast little routine.

Take care,

Bill
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
Re: Interrupt, interrupt threads, continuations, and kernel ..., Joerg Sonnenberger, (Thu Feb 22, 5:59 pm)
Re: Interrupt, interrupt threads, continuations, and kernel ..., Steven M. Bellovin, (Wed Feb 21, 10:21 pm)
Re: Interrupt, interrupt threads, continuations, and kernel ..., Bill Studenmund, (Wed Feb 21, 1:50 pm)
speck-geostationary