Re: setcontext syscall

From: Benjamin Herrenschmidt
Date: Thu Nov 20 2003 - 03:05:20 EST


On Thu, 2003-11-20 at 18:03, George Fankhauser wrote:
> Hi there!
>
> I wonder why linux i386 does not implement setcontext as a syscall.
> Instead it's in in glibc in userspace.

On ppc32, we have started doing just that, a syscall called
sys_swapcontext that does all the variations of get/set_context.
We'll do as well on ppc64 soon.

It also helps perfs because on ppc, the kernel actually knows if
things like the FPU or the Altivec unit were ever used by the
process, and so if it's worth saving/restoring those registers
as part of the context.

Ben.

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/