/[Apache-SVN]
ViewVC logotype

Revision 1568062


Jump to revision: Previous Next
Author: stefan2
Date: Thu Feb 13 22:05:26 2014 UTC (10 years, 2 months ago)
Changed paths: 1
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.


Changed paths

Path Details
Directorysubversion/trunk/subversion/libsvn_subr/cache-membuffer.c modified , text changed

infrastructure at apache.org
ViewVC Help
Powered by ViewVC 1.1.26