[lkml]   [2000]   [Nov]   [1]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: system call handling
On Wed, 1 Nov 2000 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.

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
Please read the FAQ at

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