Log Message: |
Membuffer cache hit counter update done right: introduce a separate
per-segment mutex for counter updates. Since the critical section
is very tight, there is little actual lock contention and the sync.
overhead is virtually non-existent (tested with 100 concurrent threads
on one and two-socket systems).
* subversion/libsvn_subr/cache-membuffer.c
(): Remove the comments about racy hit counter handling.
(svn_membuffer_t): Mention that our profining counters are not
thread-safe and that we don't care.
(drop_entry,
let_entry_age): Since hit counter updates are now synchronized,
there can't be any underflows in the global counters
anymore.
(svn_cache__membuffer_cache_create): Initialize the new mutex.
(increment_hit_counters): Formally return an svn_error_code to make
this function usable with our mutex macro.
(membuffer_cache_get_internal,
membuffer_cache_has_key_internal,
membuffer_cache_get_partial_internal,
membuffer_cache_set_partial_internal): Synchronize hit counter updates.
|