kernel - more kmalloc and nlookup performance optimizations
authorMatthew Dillon <dillon@apollo.backplane.com>
Mon, 5 Dec 2016 17:15:44 +0000 (09:15 -0800)
committerMatthew Dillon <dillon@apollo.backplane.com>
Mon, 5 Dec 2016 17:15:44 +0000 (09:15 -0800)
commit8edfbc5ea8601645770484df0358fa4799ab68ef
tree072fff913e956f27b89f45fdd4c06636488e7ec5
parentdfa89817f7a68d8a2958ef771b40debd33d332a1
kernel - more kmalloc and nlookup performance optimizations

* Give the pcpu counters in struct malloc_type their own cache line per
  cpu.  This removes a large kmalloc/kfree bottleneck on multi-socket
  systems

* Avoid having to ref, lock, and GETATTR intermediate directory components
  in nlookup() by adding the NCF_WXOK flag.  This flag is set in the ncp
  when the directory permissions are at least 555.  This saves significant
  overhead in all situations, including single-threaded.

Discussed-with: Mateusz Guzik (mjg_)
sys/kern/kern_slaballoc.c
sys/kern/vfs_cache.c
sys/kern/vfs_nlookup.c
sys/kern/vfs_syscalls.c
sys/sys/malloc.h
sys/sys/namecache.h
sys/sys/nlookup.h
usr.bin/vmstat/vmstat.c