syscall messaging interface API

Bill Huey (Hui) billh at gnuppy.monkey.org
Wed Jul 23 15:12:31 PDT 2003


On Wed, Jul 23, 2003 at 02:32:30PM -0700, Matthew Dillon wrote:
> : Didn't the L4 folks find a way to make system calls on Pentiums without using
> :software interrupts?  Isn't this like 10x faster?
> :
> :I need to read stuff at the Pistachio site again but I think I am correct.
> :Any chance that could get integrated into DflyBSD?  [sorry for shortenting :)]
> 
>     There are a number of ways to get into kernel mode.
> 
>     Call Gates -	Really slow
>     Trap Gates -	Reasonable
>     SYSENTER -		About twice as fast as a trap gate but there are
> 			issues (typical intel stupidity)
> 
>     Int0x80, 0x81, etc... those are trap gates.  Overhead on a 1GHz P3
>     is about 100ns to get in and 100ns to get out.
> 
>     We are going to stick with trap gates for the foreseeable future.  There
>     are plenty of other ways to make system calls more efficient in those
>     situations that require it, like adding a feature to queue several
>     system calls at once, or by chaining messages, etc...  99.9% of
>     all programs ever written in the entire history of mankind would not
>     have a noticeable improvement in performance so it just isn't worth
>     worrying about.

Syscalls speed is critical if you use a hybrid user/kernel space thread
blocking/cond-var primitive to do 1:1 threading. Linux's "futex" mechanism
exploits and optimizes it to serve the "greater threading good". :)

It shouldn't be ignored.

bill






More information about the Kernel mailing list