[openssl/openssl] fc570b: Avoid taking a write lock in ossl_provider_doall_a...
noreply at github.com
Thu Jun 1 23:15:10 UTC 2023
Author: Matt Caswell <matt at openssl.org>
Date: 2023-06-02 (Fri, 02 Jun 2023)
Avoid taking a write lock in ossl_provider_doall_activated()
We refactor ossl_provider_doall_activated() so that we only need to take
a read lock instead of a write lock for the flag_lock. This should improve
performance by avoiding the lock contention. We achieve this by protecting
the activatecnt via atomics rather than via a lock and by avoiding the full
provider activation/deactivation procedure where it is not needed.
Partial fix for #20286
Reviewed-by: Tomas Mraz <tomas at openssl.org>
Reviewed-by: Paul Dale <pauli at openssl.org>
(Merged from https://github.com/openssl/openssl/pull/20927)
More information about the openssl-commits