On 05/27/2011 04:31 PM, Ingo Molnar wrote:
One furthr optimization would be possible: in case you think we can write the signal handler in assembly or build it with gcc flags that does not use SSE we might also add a 'lightweight signal handler' kind of flag to the kernel, which does not save FPU/vector-CPU(SSE) state. In this case signals become *really* fast on x86, almost as fast as interrupts.
My old fpu rewrite had the potential to do this without a flag. We simply allocate two fpu contexts per thread (main_fpu and signal_fpu); when we deliver a signal we clear cr0.ts. If the signal touches the fpu, we save the fpu state to main_fpu and initialize the fpu; we then save/restore to signal_fpu until the signal handler exits.
-- I have a truly marvellous patch that fixes the bug which this signature is too narrow to contain. -- To unsubscribe from this list: send the line "unsubscribe kvm" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html