git: kernel - Remove getnewvnode() bottlenecks

Matthew Dillon dillon at
Fri Feb 22 10:19:15 PST 2013

commit bd7598aaf2e0bcbd4614fca451ec918904e4e974
Author: Matthew Dillon <dillon at>
Date:   Fri Feb 22 10:16:30 2013 -0800

    kernel - Remove getnewvnode() bottlenecks
    * Move the global mntvnodescan_list into the mount structure and remove
      the global mntvnode_token.  Adjust the code to use the per-mount
      mp->mnt_token instead.
    * This removes a major token bottleneck in getnewvnode(), particularly
      important when doing concurrent not-yet-cached directory scans or file
      creates under different mount points, and when the vnode cache reaches
      its nominal maximum.
    * Also add a missing piece for the last cache_findmount() commit.

Summary of changes:
 sys/kern/vfs_mount.c    | 51 +++++++++++++++++++++++++++++--------------------
 sys/kern/vfs_syscalls.c |  3 +--
 sys/sys/mount.h         |  2 ++
 sys/sys/namecache.h     |  1 +
 4 files changed, 34 insertions(+), 23 deletions(-)

DragonFly BSD source repository

More information about the Commits mailing list