Post by Sam MasonPost by Jonathan S. ShapiroPost by Sam MasonPost by Jonathan S. ShapiroThe Coyotos kernel cannot perform general up-calls, mainly because it
has no place to store the capabilities that it might call.
Why can't it work in a similar fashion to the sleep() interface? or is
the purpose of the helper process to cause the "correct" process to
block?
Because the process waiting for the interrupt needs to do other things.
What we want here is a notification upcall. The role of the helper
process is to convert the wait into an upcall.
Of course; I was only thinking of things like disk drivers when you know
when you're waiting for a response (with SCSI or IDE command queuing
even this isn't true). The general case is that of being interrupted,
hence the name.
This is the solicited vs. unsolicited distinction. For better or worse,
solicited interrupts are less and less useful this way. As the devices
become progressively more asynchronous (SATA) and start to behave more
like general busses, treating all interrupts as unsolicited becomes
progressively more attractive. There are still differences from a
scheduling and rate planning perspective, but less and less from an
interrupt demultiplexing perspective.
Post by Sam MasonPost by Jonathan S. ShapiroPost by Sam MasonPost by Jonathan S. ShapiroFor a variety of reasons, mainly having to do with interrupt
reservation, I'm wondering whether this function shouldn't be
centralized to a single (possibly multi-threaded) process.
Why do interrupts need to be reserved (especially in the kernel)? I'd
expect that the ability to wait on a hardware interrupt to be pretty
closely guarded and hence not an issue.
Guarded by whom?
I think maybe I used the wrong term, maybe "closely held"? I meant a
capability that wouldn't make its way out to normal untrusted processes,
like the one to drive a checkpoint.
It doesn't. But that doesn't alter the need to negotiate assignment of
interrupts to hardware devices.
Post by Sam MasonPost by Jonathan S. ShapiroThey need to be reserved because devices need to sort out who owns what
interrupt at device startup time. The process of reservation is how this
is done.
I thought the general case with modern PCI busses was that of interrupt
sharing, which implies to me that interrupts can't be reserved. Or
rather, it can't be knowing a priori which interrupts can be shared.
Drivers could register whether they support sharing, but this doesn't
seem to be very helpful when you have two pieces of hardware on the same
interrupt line.
Interrupt sharing is the problem that one would would *desperately* like
to prevent. The single worst decision in the design of the PCI bus was
the fact that the specification only supports four distinct physical
interrupt messages at the PCI layer and compliant implementations are
permitted to implement only one of those (and many laptop
implementations actually do that).
IMHO, current hardware interrupt architectures present a depressingly
strong argument *against* microkernels.
shap