git: kernel - more kmalloc and nlookup performance optimizations

Matthew Dillon dillon at crater.dragonflybsd.org
Mon Dec 5 09:22:31 PST 2016


commit 8edfbc5ea8601645770484df0358fa4799ab68ef
Author: Matthew Dillon <dillon at apollo.backplane.com>
Date:   Mon Dec 5 09:15:44 2016 -0800

    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_)

Summary of changes:
 sys/kern/kern_slaballoc.c | 24 +++++++-------
 sys/kern/vfs_cache.c      | 83 +++++++++++++++++++++++++++++++++++++++++++++++
 sys/kern/vfs_nlookup.c    | 74 +++++++++++++++++++++++++++++++++++-------
 sys/kern/vfs_syscalls.c   |  1 +
 sys/sys/malloc.h          | 12 ++++---
 sys/sys/namecache.h       |  6 +++-
 sys/sys/nlookup.h         |  2 +-
 usr.bin/vmstat/vmstat.c   | 22 ++++++++++---
 8 files changed, 190 insertions(+), 34 deletions(-)

http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/8edfbc5ea8601645770484df0358fa4799ab68ef


-- 
DragonFly BSD source repository


More information about the Commits mailing list