kernel - Add syscall quick return path for x86-64
authorMatthew Dillon <dillon@apollo.backplane.com>
Sat, 12 Nov 2011 23:04:56 +0000 (15:04 -0800)
committerMatthew Dillon <dillon@apollo.backplane.com>
Sat, 12 Nov 2011 23:04:56 +0000 (15:04 -0800)
commitf20816468a05fb67cffa4458b6469614e36511bb
treea68cefd14a4a07359f86b55c24a144428a60a96f
parent608499ad7b7dbb7a68a439f37570f6158f65fe28
kernel - Add syscall quick return path for x86-64

* Flag the case where a sysretq can be performed to quickly return
  from a system call instead of having to execute the slower doreti
  code.

* This about halves syscall times for simple system calls such as
  getuid(), and reduces longer syscalls by ~80ns or so on a fast
  3.4GHz SandyBridge, but does not seem to really effect performance
  a whole lot.

Taken-From: FreeBSD (loosely)
sys/cpu/i386/include/cpu.h
sys/cpu/x86_64/include/cpu.h
sys/emulation/linux/i386/linux_sysvec.c
sys/platform/pc64/x86_64/exception.S
sys/platform/pc64/x86_64/genassym.c
sys/platform/pc64/x86_64/machdep.c
sys/platform/pc64/x86_64/swtch.s
sys/platform/pc64/x86_64/tls.c
sys/platform/pc64/x86_64/trap.c
sys/sys/globaldata.h