Re: Differences between FreeBSD and Linux system call mechanism

Joerg Pommnitz (pommnitz@darmstadt.gmd.de)
Thu, 03 Sep 1998 16:58:02 +0200


Alexander Kjeldaas wrote:
>
> Doesn't this mean that it would be a good idea to let the kernel
> implement system calls by mapping a page into user-space containing
> the appropriate assembly instructions to most efficiently do the
> system calls?
>
> astor

Probably not. In this case all you would effectively do
is change the syscall interface from:

move parameters into registers
int 0x80

to
move parameters into registers
jump to kernel entry instruction
execute int 0x80 or sysenter

I don't have hard numbers, but it looks much slower to me,
even if the new kernel entry instruction is a few cycles faster
than int 0x80.

If something like this is implemented at all, it should
be done in libc. glibc already has mechanisms in place to select
CPU type optimized code at run time. It would probably be easy to
use the same thing for system calls.

-- 
Regards
       Joerg
GMD-IPSI, Dolivostr. 15, Zimmer 120, D-64293 Darmstadt
+49-6151-869-786 (Phone), -818 (FAX)

- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.altern.org/andrebalsa/doc/lkml-faq.html