]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
- Add sysctls at debug.rwlock to control the behavior of the speculative
authorJeff Roberson <jeff@FreeBSD.org>
Fri, 4 Apr 2008 10:00:46 +0000 (10:00 +0000)
committerJeff Roberson <jeff@FreeBSD.org>
Fri, 4 Apr 2008 10:00:46 +0000 (10:00 +0000)
commit00ca09449df8e90be2331c3c5541589513656e44
treefd5332828316b33e969f08af5795805892e46c05
parentaea15cbc62561caeedb9bdf69066c497861ce077
 - Add sysctls at debug.rwlock to control the behavior of the speculative
   spinning when readers hold a lock.  This spinning is speculative because,
   unlike the write case, we can not test whether the owners are running.
 - Add speculative read spinning for readers who are blocked by pending
   writers while a read lock is still held.  This allows the thread to
   spin until the write lock succeeds after which it may spin until the
   writer has released the lock.  This prevents excessive context switches
   when readers and writers both hold the lock for brief periods.

Sponsored by: Nokia
sys/kern/kern_rwlock.c