Re: 2.3.30pre1 syscall w/6 args support?

Linus Torvalds (torvalds@transmeta.com)
Wed, 8 Dec 1999 09:26:38 -0800 (PST)


On Wed, 8 Dec 1999, Ingo Molnar wrote:
>
> i believe the best solution is to not call sys_vm86() with SYSENTER. The
> reason is to not slow down all the other system calls with an extra check
> for VM_MASK.

Well... You'll also have to cover stuff like "sigreturn" etc, which _can_
be quite timing critical.

And there's also the issue of non-system-calls. Things like the return
from the page fault handler could very well be speeded up using SYSEXIT,
by just making SYSEXIT part of the regular return sequence. Basically,
change the "restore_all" code in arch/i386/kernel/entry.S to dynamically
switch between "iret" and "SYSEXIT" - then _every_ normal kernel exit gets
speeded up.

No special cases. You lose by having three comparisons: you need to check
DS, SS and weflags. But that's on the order of a few cycles, and you win
by using SYSEXIT whenever possible - including interrupts, page faults,
etc.

I agree that you could _additionally_ have the simple-fast-system-call
case, but I wonder if the few cycles you save by avoiding the comparison
is even worth it.

Linus

-
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.tux.org/lkml/