Performance cleanup. Greatly reduce the number of %fs prefixed globaldata
authorMatthew Dillon <dillon@dragonflybsd.org>
Fri, 25 Jul 2003 05:51:19 +0000 (05:51 +0000)
committerMatthew Dillon <dillon@dragonflybsd.org>
Fri, 25 Jul 2003 05:51:19 +0000 (05:51 +0000)
commit7966cb69dec3d39c0886fd64f6627cb8487da96f
tree4c9b8961d803d02758710a72e981ac120dd9b4d8
parent009fa822321bfa6e301c8147410c2fc10c24dd6d
Performance cleanup.  Greatly reduce the number of %fs prefixed globaldata
lookups by taking advantage of the fact that DragonFly does not preemptively
switch threads to other cpus to cache the globaldata pointer, to pass the
current thread to certain inlines rather then force them to reload it from
%fs, and to use td->td_gd to access the globaldata pointer when td is
available rather then mycpu.

This coupled with the curthread optimization done in a prior commit improved
syscall overheads by 60-100ns (about 7%).
sys/i386/i386/trap.c
sys/kern/lwkt_thread.c
sys/platform/pc32/i386/trap.c
sys/sys/globaldata.h
sys/sys/thread2.h