git: kernel - Micro optimization for vnode exclusive lock
Matthew Dillon
dillon at crater.dragonflybsd.org
Sat Feb 15 11:48:36 PST 2020
commit 221494c8053d89707ea8a45a0add00c07f5a377a
Author: Matthew Dillon <dillon at apollo.backplane.com>
Date: Sat Feb 15 11:43:10 2020 -0800
kernel - Micro optimization for vnode exclusive lock
* Micro-optimize open(... O_RDWR) by allowing a shared vnode lock for
this case when opening a file which is not an executable.
We used to unconditionally get an exclusive lock to deal with VTEXT vs
O_RDWR races against executables, but this can cause unnecessary SMP
contention on normal files and devices opened O_RDWR which are not
executables.
Summary of changes:
sys/kern/vfs_cache.c | 4 ++--
sys/kern/vfs_nlookup.c | 12 +++++++++---
sys/kern/vfs_syscalls.c | 10 +++++++---
sys/kern/vfs_vnops.c | 20 ++++++++++++++++++--
sys/sys/namecache.h | 2 +-
sys/sys/nlookup.h | 1 +
6 files changed, 38 insertions(+), 11 deletions(-)
http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/221494c8053d89707ea8a45a0add00c07f5a377a
--
DragonFly BSD source repository
More information about the Commits
mailing list