Checkout Tools
  • last updated 1 hour ago
Constraints
Constraints: committers
 
Constraints: files
Constraints: dates
Moving membuffer cache related configuration code from deep inside the FS

layer to the svn utilities where all other cache related code lives.

Details on the discussion can be found here:

http://svn.haxx.se/dev/archive-2011-04/0169.shtml

To minimize the risks of breaking builds on other platforms, library

dependencies will be cleaned up in a follow-up commit.

* subversion/include/private/svn_fs_private.h

(svn_fs__get_global_membuffer_cache): remove here

* subversion/include/private/svn_cache.h

(svn_cache__get_global_membuffer_cache): rename and move it to here

* subversion/include/svn_fs.h

(svn_fs_cache_config_t, svn_fs_get_cache_config, svn_fs_set_cache_config):

remove here

* subversion/include/svn_cache_config.h

(svn_cache_config_t, svn_get_cache_config, svn_set_cache_config):

rename and move them to this new header file; adapt docstrings

* subversion/libsvn_fs_util/caching.c

move to:

* subversion/libsvn_subr/svn_cache_config.c

(svn_cache_config_t, svn_get_cache_config, svn_set_cache_config):

rename

* subversion/libsvn_fs_fs/caching.c

(svn_fs_fs__initialize_caches, svn_fs_fs__initialize_txn_caches):

adapt to renamed API functions

* subversion/libsvn_ra/ra_loader.c

(svn_ra_initialize): remove cache config code

* subversion/svn/main.c

(main): move it here and adapt it to renamed API

* subversion/svnadmin/main.c

(#includes): include svn_cache_config.h instead of svn_fs.h

(main): adapt to renamed API functions and structures

* subversion/svnserve/main.c

(#includes, main): dito

* build.conf

(libsvn_subr): add the new svn_cache_config.h header to the DLL exports

  1. … 11 more files in changeset.
LINUX and possibly other OS will over-commit memory. I.e. actual

memory pages allocation will be deferred to the time of the first

access. As a result, the application may simply segfault later.

Therefore, ensure that the membuffer creation actually allocates

memory pages. Also, free the whole cache memory if allocation

of some parts failed. Continue with the cache disabled in that case.

* subversion/libsvn_fs_util/caching.c

(svn_fs__get_global_membuffer_cache): if cache creation fails,

actually free the previously allocated memory

* subversion/libsvn_subr/cache-membuffer.c

(secure_aligned_pcalloc): replacement for apr_pcalloc that will

not crash upon OOM

(svn_cache__membuffer_cache_create): ensure that memory

gets actually allocated despite of overcommitment by the OS;

don't try to continue upon OOM

  1. … 1 more file in changeset.
Explain why the defaults caching settings have been chosen that way.

* subversion/libsvn_fs_util/caching.c

(cache_settings): add extensive commentary to the default values

Followup to r1067687, fix massive memory use.

* subversion/libsvn_fs_util/caching.c

(svn_fs__get_global_membuffer_cache): Store pointer in correct variable.

Fix merge / manual conflict resolution artifacts.

* subversion/libsvn_fs_util/caching.c

(cache_settings): add missing "#endif"

(svn_fs__get_global_membuffer_cache): fix parameters and "volatile" usage

Merged latest caching bug fixes from performance branch:

revisions 1029232, 1032333, 1033040, 1033057 and 1033294

(support for "no threads", typos, error leaks)

  1. … 2 more files in changeset.
Defer cache initialization to first usage: mod_dav_svn may have to

call svn_fs_set_cache_config() more than once if the Apache config

contains multiple caching related parameters (not today, but in the

near future). Also, this reduces the memory footprint if not all server

instances actually access FSFS repositories.

* subversion/libsvn_fs_util/caching.c

(svn_fs__get_global_membuffer_cache): make it thread-safe and

allow for concurrent initialization.

(svn_fs_set_cache_config): don't create caches as a side-effect.

Changing caching defaults to "16MB membuffer cache, fulltext caching on".

* subversion/libsvn_fs_util/caching.c:

(cache_settings): change defaults

Merge all changes (r998649, r998843, r998852) from the

integrate-cache-membuffer branch.

These patches introduce in-process full-text caching.

  1. … 8 more files in changeset.