tech-kern archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: Interrupt flow in the NetBSD kernel
> On Jun 21, 2015, at 12:02 PM, Reinoud Zandijk <reinoud%NetBSD.org@localhost> wrote:
>
> Hi Matt,
>
> On Sun, Jun 21, 2015 at 08:01:47AM -0700, Matt Thomas wrote:
>> IMO, softints are an abberation and should really be thread priorities and
>> dealt by the thread scheduler.
>
> Each level of softint as a kernel thread that gets woken up by condition
> variables?
I envision them being hard realtime kernel threads that would preempt
lower priority threads.
> Could in a virtualisation context those threads also be used and be woken by
> signalling the relevant condition variable on reception of say an virtio push?
Could be.
But my goal is something intrinsically different. In the interrupt, you signal
a condition variable or some other method of making a thread runnable.
A run though the scheduler happens and new thread is selected to run.
In addition to exceptions and interrupts using a common trapframe,
cpu_switchto should also need to use a trapframe to store the lwp’s
context. When restoring a trapframe, switchto will need to know which type
of trapframe it was.
When the interrupt is about to restore the trapframe, if the scheduler decided
to switch to another lwp, it will do so using that lwp’s trapframe.
The goal is to have near instant context switching without the hackery of the
current preeemption code.
Home |
Main Index |
Thread Index |
Old Index