Subject: Re: upcalls?
To: Jason Thorpe <firstname.lastname@example.org>
From: Jeff Roberson <email@example.com>
Date: 12/09/1999 10:26:29
> I think we would be well-served to convert our kernel to use LWPs as
> the scheduling primitive (like Solaris), and adding the upcall mechanism
> documented in the SA paper.
I was actually working on this as a personal project. Most of the work is
just in moving lwp specific things out of the proc structure and into a
new substructure. Also anywhere curproc is referenced has to be changed,
which means changing a bit of MD code. Like cpu_switch, etc. in locore.
This is especially easy because solaris has already worked out the
required symantics for the syscalls. This gives you a multitiered
threading model such that you can schedule any number of user space
threads onto a limited number of kernel threads. So you can have one lwp
for each physical processor, or one for each user space thread that is
blocking, etc. This would clean out a lot of the polling kludge
mit-pthreads does on blocking io, and give you an immense performance
improvement just because threads would only wake up when resources are
actually available to them.
The real benefit of this would be the ability to expand in the future. If
someone writes a pthreads library on top of this threading model you can
extend on it to use scheduler activations in the future. It seems like a
logical flow of events to me. It would be much less code to write before
something actually works.
One thing which I haven't figured out is would be debugging.. Since each
lwp has it's on machine dependant registers that means you would only be
tracing one lwp at a time, which completely breaks current debugging
> This would also be a win for our Solaris emulation. And it might not
> actually be that hard to do.
> -- Jason R. Thorpe <firstname.lastname@example.org>