git: kernel - Fix a case in the path lookup that results in high latencies
dillon at crater.dragonflybsd.org
Fri Jun 7 15:18:31 PDT 2013
Author: Matthew Dillon <dillon at apollo.backplane.com>
Date: Fri Jun 7 15:13:21 2013 -0700
kernel - Fix a case in the path lookup that results in high latencies
* When many cpu cores are looking up paths with matching components,
so as when doing a parallel buildworld or a parallel build of
/usr/src/lib/libc, the namecache's shared/exclusive lock mechanic
can break-down and create a chain-reaction of exclusive locks which
* When attempting to get a shared lock we were previously backing-down to
an exclusive lock if the shared lock could not be obtained non-blocking.
The original code could cause a chain-reaction of unnecessary exclusive
Instead, we now only back-down to an exclusive lock only if the current
thread already holds an exclusive lock on the same namecache entry
or if we detect that another thread is trying to get an exclusive lock.
Otherwise we fall-through and obtain the shared lock in a blocking manner.
Summary of changes:
sys/kern/vfs_cache.c | 23 ++++++++++++++++++++++-
1 file changed, 22 insertions(+), 1 deletion(-)
DragonFly BSD source repository
More information about the Commits