Accelerating user mode linux

Alan Cox
2002-08-01T20:13:35Z

Proposal for a sigaltmm()

There is a problem with performance when running virtualised environments
(notably user mode linux). The performance of the mprotect calls needed to
handle syscalls and protect the UML kernel from its user space are large and
the alternatives like a seperate process and ptrace are not pretty either

The cunning plan goes like this

Add
current->alt_mm
A per task flag for 'supervisory' mode

Tasks start with current->alt_mm NULL and the flag set to supervisory
On exec/exit tear down alt_mm as well as mm

Signal delivery checks if alt_mm != NULL && supervisory is clear
if so it sets supervisory and switches mm/alt_mm, flush the tlb and
continue handling the signal in the new space

We add
sys_switchmm(address);

This switches to the altmm (creating one if it doesnt exist as a copy of
the current mm), flushes the tlb and jumps to the address given.

Any opinions, spanners to throw in the works ?

Alan