Re: [PATCH] compatibility syscall layer (lets try again)

From: Linus Torvalds (torvalds@transmeta.com)
Date: Wed Dec 04 2002 - 17:42:36 EST


On Wed, 4 Dec 2002, george anzinger wrote:
>
> On the PARISC I did this (a long time ago in a far away
> place) by unwinding the stack to pick up the registers that
> were saved along the way. Is this at all feasible?

No. Alpha (and apparently sparc) simply do not save the registers that the
signal handling wants on the stack _at_all_. There are too many registers
to save at each system call entry point, and 99% of all system calls never
need it.

The system call return that checks for signals anyway will end up saving a
special stack frame when needed. As will the special signal-related system
calls (sigsuspend() and friends). All of this is not only architecture-
dependent, it is literally coded in assembly language for the
architectures. See "do_switch_stack()" for alpha.

Anyway, if you wondered why Linux beats every other Unix out there on
system call overhead, now you know. And yes, this is important.

                Linus

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



This archive was generated by hypermail 2b29 : Sat Dec 07 2002 - 22:00:20 EST