git: kernel - Add syscall quick return path for x86-64

Matthew Dillon dillon at crater.dragonflybsd.org
Sat Nov 12 15:08:17 PST 2011


commit f20816468a05fb67cffa4458b6469614e36511bb
Author: Matthew Dillon <dillon at apollo.backplane.com>
Date:   Sat Nov 12 15:04:56 2011 -0800

    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)

Summary of changes:
 sys/cpu/i386/include/cpu.h              |    2 ++
 sys/cpu/x86_64/include/cpu.h            |    2 ++
 sys/emulation/linux/i386/linux_sysvec.c |    4 ++++
 sys/platform/pc64/x86_64/exception.S    |   24 ++++++++++++++++++++++++
 sys/platform/pc64/x86_64/genassym.c     |    1 +
 sys/platform/pc64/x86_64/machdep.c      |    4 ++++
 sys/platform/pc64/x86_64/swtch.s        |    6 ++++++
 sys/platform/pc64/x86_64/tls.c          |    1 +
 sys/platform/pc64/x86_64/trap.c         |    1 +
 sys/sys/globaldata.h                    |    2 ++
 10 files changed, 47 insertions(+), 0 deletions(-)

http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/f20816468a05fb67cffa4458b6469614e36511bb


-- 
DragonFly BSD source repository





More information about the Commits mailing list