kernel - Performance tuning
authorMatthew Dillon <dillon@apollo.backplane.com>
Sat, 9 Nov 2013 04:59:32 +0000 (20:59 -0800)
committerMatthew Dillon <dillon@apollo.backplane.com>
Sat, 9 Nov 2013 04:59:32 +0000 (20:59 -0800)
commit12cdc371fb859682eda7d1c26c5059920a7cf118
tree793398349bbb8ac7c98cf992c12bd953e047ab3b
parent6ebd652fc20d94dea78fdb5859a25607ffb66683
kernel - Performance tuning

* Use a shared lock in the exec*() code, open, close, chdir, fchdir,
  access, stat, and readlink.

* Adjust nlookup() to allow the last namecache record in a path to be
  locked shared if it is already resolved, and the caller requests it.

* Remove nearly all global locks from critical dsched paths.  Defer
  creation of the tdio until an I/O actually occurs (huge savings in
  the fork/exit paths).

* Improves fork/exec concurrency on monster of static binaries from
  14200/sec to 55000/sec+.  For dynamic binaries improve from around
  2500/sec to 9000/sec or so (48 cores fork/exec'ing different dynamic
  binaries).  For the same dynamic binary it's more around 5000/sec or
  so.

  Lots of issues here including the fact that all dynamic binaries load
  many shared resources, even hen the binaries are different programs.
  AKA libc.so.X and ld-elf.so.2, as well as /dev/urandom (from libc),
  and access numerous common path elements.

  Nearly all of these paths are now non-contending.  The major remaining
  contention is in per-vm_page/PMAP manipulation.  This is per-page and
  concurrent execs of the same program tend to pipeline so it isn't a
  big problem.
29 files changed:
sys/kern/imgact_elf.c
sys/kern/kern_dsched.c
sys/kern/kern_exec.c
sys/kern/vfs_cache.c
sys/kern/vfs_default.c
sys/kern/vfs_nlookup.c
sys/kern/vfs_syscalls.c
sys/kern/vfs_vnops.c
sys/sys/dsched.h
sys/sys/nlookup.h
sys/vfs/deadfs/dead_vnops.c
sys/vfs/devfs/devfs_vnops.c
sys/vfs/dirfs/dirfs_vnops.c
sys/vfs/hammer/hammer_ondisk.c
sys/vfs/hammer/hammer_volume.c
sys/vfs/hammer2/hammer2_vfsops.c
sys/vfs/hpfs/hpfs_vfsops.c
sys/vfs/isofs/cd9660/cd9660_vfsops.c
sys/vfs/msdosfs/msdosfs_vfsops.c
sys/vfs/nfs/nfs_vnops.c
sys/vfs/ntfs/ntfs_vfsops.c
sys/vfs/nwfs/nwfs_vnops.c
sys/vfs/procfs/procfs_vnops.c
sys/vfs/puffs/puffs_vnops.c
sys/vfs/smbfs/smbfs_vnops.c
sys/vfs/udf/udf_vfsops.c
sys/vfs/ufs/ffs_vfsops.c
sys/vfs/union/union_subr.c
sys/vfs/union/union_vnops.c