kernel - Simple code path optimizations
authorMatthew Dillon <dillon@apollo.backplane.com>
Wed, 26 Feb 2020 06:05:43 +0000 (22:05 -0800)
committerMatthew Dillon <dillon@apollo.backplane.com>
Wed, 26 Feb 2020 06:05:43 +0000 (22:05 -0800)
commit2ff21866646c375554d68d9786f54f5ae72f6aeb
tree0781253ef0b827e71daaf85ffa83005aebb5fd95
parentee09cc60d22ee912e69f15d20ddebfe520b3ea68
kernel - Simple code path optimizations

* Add __read_mostly and __read_frequently to numerous variables as
  appropriate to reduce unnecessary cache line ping-ponging.

* Adjust conditionals in the syscall code with __predict_true/false
  to clean up the execution path.
sys/kern/kern_clock.c
sys/kern/kern_exec.c
sys/kern/kern_shutdown.c
sys/kern/vfs_cache.c
sys/net/netisr.c
sys/platform/pc64/x86_64/trap.c
sys/platform/vkernel64/x86_64/trap.c
sys/sys/ktr.h
sys/sys/ktrace.h
sys/sys/proc.h
sys/vm/vm_map.c