Hi, Could someone here give me some optimization advice/reference about vnode locking? Recently we find that vnode lookup locking has significant negative impact on I/O latency. We trace down to two places in the source code which initiated the locking:
1. the vn_lock( ) in lookup( ), kern/vfs_lookup.c, which locks the current directory vnode. I suppose it is released until the target leaf vnode is found. Does this lock need to be exclusive? 2. the two vget() calls in kern/vfs_cache.c. After looking at the source code changing logs, it seems that there's a "LOCKSHARED" option to solve the problem. But this option is not included until release 5.0 or 5.1. So my question is why it used EXCLUSIVE lock for lookup (which is a cache hit path)? And is there any other issues if using SHARED lock? Any explanation and points to references would be greatly appreciated. -Yaoping _______________________________________________ [EMAIL PROTECTED] mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to "[EMAIL PROTECTED]"

