subversion-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From stef...@apache.org
Subject svn commit: r1547134 - /subversion/trunk/subversion/libsvn_fs_fs/caching.c
Date Mon, 02 Dec 2013 18:32:51 GMT
Author: stefan2
Date: Mon Dec  2 18:32:51 2013
New Revision: 1547134

URL: http://svn.apache.org/r1547134
Log:
If membuffer caches are being disabled, make sure that mandatory
caches are still being created (using the 1.6 in-process cache).

FSFS format 7 index cache code never skips the cache lookup and
update.  Allowing for NULL index caches would at least tripple
the amount of I/O (opening 3 files instead of one to access data).
So, those caches are mandatory and even small ones will help.

* subversion/libsvn_fs_fs/caching.c
  (svn_fs_fs__initialize_caches): Set in-process cache dimensions
                                  on index caches as well as other
                                  non-conditional caches - even if
                                  the using code would check for NULL.

Modified:
    subversion/trunk/subversion/libsvn_fs_fs/caching.c

Modified: subversion/trunk/subversion/libsvn_fs_fs/caching.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_fs_fs/caching.c?rev=1547134&r1=1547133&r2=1547134&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_fs_fs/caching.c (original)
+++ subversion/trunk/subversion/libsvn_fs_fs/caching.c Mon Dec  2 18:32:51 2013
@@ -493,7 +493,7 @@ svn_fs_fs__initialize_caches(svn_fs_t *f
   SVN_ERR(create_cache(&(ffd->node_revision_cache),
                        NULL,
                        membuffer,
-                       0, 0, /* Do not use inprocess cache */
+                       32, 32, /* ~200 byte / entry; 1k entries total */
                        svn_fs_fs__serialize_node_revision,
                        svn_fs_fs__deserialize_node_revision,
                        sizeof(pair_cache_key_t),
@@ -507,7 +507,7 @@ svn_fs_fs__initialize_caches(svn_fs_t *f
   SVN_ERR(create_cache(&(ffd->rep_header_cache),
                        NULL,
                        membuffer,
-                       0, 0, /* Do not use inprocess cache */
+                       1, 1000, /* ~8 bytes / entry; 1k entries total */
                        svn_fs_fs__serialize_rep_header,
                        svn_fs_fs__deserialize_rep_header,
                        sizeof(representation_cache_key_t),
@@ -521,7 +521,7 @@ svn_fs_fs__initialize_caches(svn_fs_t *f
   SVN_ERR(create_cache(&(ffd->changes_cache),
                        NULL,
                        membuffer,
-                       0, 0, /* Do not use inprocess cache */
+                       1, 8, /* 1k / entry; 8 entries total, rarely used */
                        svn_fs_fs__serialize_changes,
                        svn_fs_fs__deserialize_changes,
                        sizeof(svn_revnum_t),
@@ -661,7 +661,8 @@ svn_fs_fs__initialize_caches(svn_fs_t *f
       SVN_ERR(create_cache(&(ffd->l2p_header_cache),
                            NULL,
                            membuffer,
-                           0, 0, /* Do not use inprocess cache */
+                           64, 16, /* entry size varies but we must cover
+                                      a reasonable number of revisions (1k) */
                            svn_fs_fs__serialize_l2p_header,
                            svn_fs_fs__deserialize_l2p_header,
                            sizeof(pair_cache_key_t),
@@ -674,7 +675,8 @@ svn_fs_fs__initialize_caches(svn_fs_t *f
       SVN_ERR(create_cache(&(ffd->l2p_page_cache),
                            NULL,
                            membuffer,
-                           0, 0, /* Do not use inprocess cache */
+                           64, 16, /* entry size varies but we must cover
+                                      a reasonable number of revisions (1k) */
                            svn_fs_fs__serialize_l2p_page,
                            svn_fs_fs__deserialize_l2p_page,
                            sizeof(svn_fs_fs__page_cache_key_t),
@@ -687,7 +689,7 @@ svn_fs_fs__initialize_caches(svn_fs_t *f
       SVN_ERR(create_cache(&(ffd->p2l_header_cache),
                            NULL,
                            membuffer,
-                           0, 0, /* Do not use inprocess cache */
+                           4, 1, /* Large entries. Rarely used. */
                            svn_fs_fs__serialize_p2l_header,
                            svn_fs_fs__deserialize_p2l_header,
                            sizeof(pair_cache_key_t),
@@ -700,7 +702,7 @@ svn_fs_fs__initialize_caches(svn_fs_t *f
       SVN_ERR(create_cache(&(ffd->p2l_page_cache),
                            NULL,
                            membuffer,
-                           0, 0, /* Do not use inprocess cache */
+                           4, 16, /* Variably sized entries. Rarely used. */
                            svn_fs_fs__serialize_p2l_page,
                            svn_fs_fs__deserialize_p2l_page,
                            sizeof(svn_fs_fs__page_cache_key_t),



Mime
View raw message