Subject: Re: Which Gates to use?
To: None <cgd@alpha.bostic.com, mycroft@gnu.ai.mit.edu>
From: None <mycroft@gnu.ai.mit.edu>
List: port-i386
Date: 10/25/1994 15:39:16
           (1) what the concrete speed difference is

My `back of the post-it pad' calculation is that the trap gate would
have a net savings of 25 cycles on a 386.

           (2) why it's so much harder to just turn off the trace

Because it's not saved by the call gate.  (Didn't I already explain
this?)

           (3) what would be done to eliminate the problem for the

The old interface would just be a small piece of code that runs before
the syscall handler; it would turn off the trap bit and save eflags.
(It would have to save and restore a scratch register this way, but the
real cost of that is small, and it's only for old executables anyway.)

So, if the trace trap handler noticed that the pc is anywhere in that
code, it would simply ignore the trap; otherwise it would call DDB or
send a SIGTRAP, as appropriate.

This allows one to trace through the new syscall handler, too.