lkml.org 
[lkml]   [2000]   [Nov]   [1]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: system call handling
On Wed, 1 Nov 2000 mdaljeet@in.ibm.com wrote:

> Hi,
>
> By looking into the structure of GDT as used by linux kernel(file
> include/asm/desc.c, kernel ver 2.4), it appears as if linux kernel does not
> use the "call gate descriptors" for system call handling. Is this correct?
>

You could use a call-gate to get from one priv level to another but
Linux uses a software trap (int 0x80). It provides good locality
of the kernel entry code which helps keep caches warm. If you used
call-gates, their entry points would be scattered all over kernel
space. Further, you'd have a lot of them (as many as there are
kernel functions).

If you designed it with just one call-gate, with one entry point,
you would have exactly what we have now except you would execute
a `call CALL_GATE` instead of `int 0x80`. This turns out to be
6 of one and 1/2 dozen of another when it comes to performance.

Cheers,
Dick Johnson

Penguin : Linux version 2.2.17 on an i686 machine (801.18 BogoMips).

"Memory is like gasoline. You use it up when you are running. Of
course you get it all back when you reboot..."; Actual explanation
obtained from the Micro$oft help desk.


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

\
 
 \ /
  Last update: 2005-03-22 12:45    [W:0.029 / U:49.980 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site