On 06/11/2014 02:26 PM, Salz, Rich wrote:
What kinds of operations are protected by read locks?

Looking at almost any of the global data structures, such as error tables, OID 
tables, and so on.

Often, RW locks aren't a win because maintaining just the read locks (without 
any writers) introduces contention at the hardware level, and parallelism does 
not increase all that much as a result.  Paul McKenney's dissertation on RCU 
has some examples.

We've monitored one of our applications, an SSL-terminating HTTP proxy server, under 
load. Of all the mutexes (futex, actually) in the system, the "error" lock is 
the most highly contended one.  I'll see about posting some statistics.

Is this CRYPTO_LOCK_ERR? It would be interesting which locking path actually triggers the contention. If it's the thread-local storage re-implementation, it should be possible to use an ERR implementation which uses native thread-local storage, which should be mostly contention-free.

--
Florian Weimer / Red Hat Product Security Team
______________________________________________________________________
OpenSSL Project                                 http://www.openssl.org
Development Mailing List                       openssl-dev@openssl.org
Automated List Manager                           majord...@openssl.org

Reply via email to