John Richard Moser
2006-10-12 15:44:56 UTC
Can context switches be made faster? This is a simple question, mainly
because I don't really understand what happens during a context switch
that the kernel has control over (besides storing registers).
Linux ported onto the L4-Iguana microkernel is reported to be faster
than the monolith[1]; it's not like microkernels are faster, but the
L4-Iguana apparently just has super awesome context switching code:
Wombat's context-switching overheads as measured by lmbench on an
XScale processor are up to thirty times less than those of native
Linux, thanks to Wombat profiting from the implementation of fast
context switches in L4-embedded.
The first question that comes into my mind is, obviously, is this some
special "fast context switch" code for only embedded systems; or is it
possible to work this on normal systems?
The second is, if it IS possible to get faster context switches in
general use, can the L4 context switch methods be used in Linux? I
believe L4 is BSD licensed-- at least the files in their CVS repo that I
looked at have "BSD" stamped on them. Maybe some of the code can be
examined, adopted, adapted, etc.
If it's not possible to speed up context switches, the classical
question would probably be.. why not? ;) No use knowing a thing and
not understanding it; you get situations like this right here... :)
[1]http://l4hq.org/
- --
We will enslave their women, eat their children and rape their
cattle!
-- Bosc, Evil alien overlord from the fifth dimension
because I don't really understand what happens during a context switch
that the kernel has control over (besides storing registers).
Linux ported onto the L4-Iguana microkernel is reported to be faster
than the monolith[1]; it's not like microkernels are faster, but the
L4-Iguana apparently just has super awesome context switching code:
Wombat's context-switching overheads as measured by lmbench on an
XScale processor are up to thirty times less than those of native
Linux, thanks to Wombat profiting from the implementation of fast
context switches in L4-embedded.
The first question that comes into my mind is, obviously, is this some
special "fast context switch" code for only embedded systems; or is it
possible to work this on normal systems?
The second is, if it IS possible to get faster context switches in
general use, can the L4 context switch methods be used in Linux? I
believe L4 is BSD licensed-- at least the files in their CVS repo that I
looked at have "BSD" stamped on them. Maybe some of the code can be
examined, adopted, adapted, etc.
If it's not possible to speed up context switches, the classical
question would probably be.. why not? ;) No use knowing a thing and
not understanding it; you get situations like this right here... :)
[1]http://l4hq.org/
- --
We will enslave their women, eat their children and rape their
cattle!
-- Bosc, Evil alien overlord from the fifth dimension