Details
-
Improvement
-
Resolution: Unresolved
-
Major
-
None
-
15.10
-
Unknown
-
Description
When reading entries from the security cache, we're currently always locking the read lock. This is problematic because when the security cache is quite full we'll also frequently insert entries into the security cache which needs a write a lock. As the lock is fair, any write access that is waiting for read accesses to complete, will block all following read accesses. This can lead to a lot of overhead from locking.
There is a good reason for the write lock for insertion as many internal data structures aren't thread-safe. However, when just getting an entry, these data structures that aren't thread-safe aren't touched and thus it isn't necessary to protect from concurrent modification. It should again be carefully checked that this is indeed the case but it seems likely.