On Sun, May 04, 2014 at 04:31:06PM -0400, Geoff Thorpe wrote: > The lazy-initialisation of BN_MONT_CTX was serialising all threads, as > noted by Daniel Sands and co at Sandia. This was to handle the case that > 2 or more threads race to lazy-init the same context, but stunted all > scalability in the case where 2 or more threads are doing unrelated > things! We favour the latter case by punishing the former. The init work > gets done by each thread that finds the context to be uninitialised, and > we then lock the "set" logic after that work is done - the winning > thread's work gets used, the losing threads throw away what they've done.
I'm not sure I understand it. Why would 2 threads use the same Montgomery context and need to keep initialising it? I would guess that if that really is the problem that both threads still keep spending the same amount of time in that function. I don't see why this would change anything. Kurt ______________________________________________________________________ OpenSSL Project http://www.openssl.org Development Mailing List openssl-dev@openssl.org Automated List Manager majord...@openssl.org