[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

RE: Performance branch ready for review

From: Bert Huijben <bert_at_vmoo.com>
Date: Wed, 18 Aug 2010 18:08:51 -0700

> -----Original Message-----
> From: Johan Corveleyn [mailto:jcorvel_at_gmail.com]
> Sent: woensdag 18 augustus 2010 15:59
> To: Stefan Fuhrmann
> Cc: Subversion Development
> Subject: Re: Performance branch ready for review
>
> On Wed, Aug 18, 2010 at 9:14 PM, Stefan Fuhrmann
> <stefanfuhrmann_at_alice-dsl.de> wrote:
> > Hi @all,
> >
> > I just finished my porting work; the performance branch
> > is now fully synchronized with my prototype code.
> > From my point of view, review can start now.
> >
> > According to my measurements, the code is now faster
> > than the original prototype. Large caches provided, a
> > single multi-threaded svnserve instance on a modern
> > quad-core machine should be able to saturate a 10Gb
> > server connection.
> >
> > Open issues / things still to do
> >
> > * there is an issue with "log" triggering an assertion()
> >  -> I will investigate that next
> > * test mod_web_dav and add FSFS cache configuration
> >  parameters to it
> > * tune membuffer cache eviction strategy such that even
> >  small caches can have a large impact
> > * add tests for the new APIs
> > * provide APR patches.
> >
> > There are many things I would like to do but they may
> > better be deferred to 1.8.
>
> I tried compiling your branch on Windows (XP) with Visual C++ Express
> 2008 (which I also use successfully to build trunk). I had a couple of
> issues. FWIW I'm listing them here. I'm not an expert, just
> pragmatically trying to get the thing to build, so some of these
> things may be "user error". Eventually, I was able to build svn.exe,
> but svnadmin.exe and svnserve.exe still fail for me.
>
> 1) In build.conf, I added private\svn_temp_serializer.h and
> private\svn_file_handle_cache.h to the list of msvc-export of
> libsvn_subr. Otherwise, the linker gave problems:
>
> libsvn_fs_fs-1.lib(fs_fs.obj) : error LNK2019: unresolved external
> symbol _svn_file_handle_cache__has_file referenced in function
> _svn_fs_fs__path_rev_absolute
> libsvn_fs_fs-1.lib(fs_fs.obj) : error LNK2019: unresolved external
> symbol _svn_stream__from_cached_file_handle referenced in function
> _get_node_revision_body
> libsvn_fs_fs-1.lib(fs_fs.obj) : error LNK2019: unresolved external
> symbol _svn_file_handle_cache__open referenced in function
> _get_node_revision_body
> libsvn_fs_fs-1.lib(fs_fs.obj) : error LNK2019: unresolved external
> symbol _svn_file_handle_cache__get_apr_handle referenced in function
> _open_pack_or_rev_file
> libsvn_fs_fs-1.lib(fs_fs.obj) : error LNK2019: unresolved external
> symbol _svn_file_handle_cache__flush referenced in function
> _sync_file_handle_cache
> libsvn_fs_fs-1.lib(fs_fs.obj) : error LNK2019: unresolved external
> symbol _svn_file_handle_cache__close referenced in function
> _svn_fs_fs__rev_get_root
> libsvn_fs_fs-1.lib(caching.obj) : error LNK2019: unresolved external
> symbol _svn_file_handle_cache__create_cache referenced in function
> _get_global_file_handle_cache
> libsvn_fs_fs-1.lib(id.obj) : error LNK2019: unresolved external symbol
> _svn_temp_serializer__pop referenced in function
> _svn_fs_fs__id_serialize
> libsvn_fs_fs-1.lib(temp_serializer.obj) : error LNK2001: unresolved
> external symbol _svn_temp_serializer__pop
> libsvn_fs_fs-1.lib(id.obj) : error LNK2019: unresolved external symbol
> _svn_temp_serializer__push referenced in function
> _svn_fs_fs__id_serialize
> libsvn_fs_fs-1.lib(temp_serializer.obj) : error LNK2001: unresolved
> external symbol _svn_temp_serializer__push
> libsvn_fs_fs-1.lib(id.obj) : error LNK2019: unresolved external symbol
> _svn_temp_serializer__add_string referenced in function
> _serialize_id_private
> libsvn_fs_fs-1.lib(temp_serializer.obj) : error LNK2001: unresolved
> external symbol _svn_temp_serializer__add_string
> libsvn_fs_fs-1.lib(dag.obj) : error LNK2001: unresolved external
> symbol _svn_temp_serializer__add_string
> libsvn_fs_fs-1.lib(id.obj) : error LNK2019: unresolved external symbol
> _svn_temp_deserializer__resolve referenced in function
> _svn_fs_fs__id_deserialize
> libsvn_fs_fs-1.lib(temp_serializer.obj) : error LNK2001: unresolved
> external symbol _svn_temp_deserializer__resolve
> libsvn_fs_fs-1.lib(dag.obj) : error LNK2001: unresolved external
> symbol _svn_temp_deserializer__resolve
> libsvn_fs_fs-1.lib(temp_serializer.obj) : error LNK2019: unresolved
> external symbol _svn_temp_serializer__get referenced in function
> _svn_fs_fs__serialize_txdelta_window
> libsvn_fs_fs-1.lib(dag.obj) : error LNK2001: unresolved external
> symbol _svn_temp_serializer__get
> libsvn_fs_fs-1.lib(temp_serializer.obj) : error LNK2019: unresolved
> external symbol _svn_temp_serializer__init referenced in function
> _svn_fs_fs__serialize_txdelta_window
> libsvn_fs_fs-1.lib(dag.obj) : error LNK2001: unresolved external
> symbol _svn_temp_serializer__init
> libsvn_fs_fs-1.lib(temp_serializer.obj) : error LNK2019: unresolved
> external symbol _svn_temp_deserializer__ptr referenced in function
> _svn_fs_fs__extract_dir_entry
> libsvn_fs_fs-1.lib(dag.obj) : error LNK2019: unresolved external
> symbol _svn_temp_serializer__set_null referenced in function
> _svn_fs_fs__dag_serialize
> ..\..\..\Debug\subversion\libsvn_fs\libsvn_fs-1.dll : fatal error
> LNK1120: 15 unresolved externals
>
> Here's a patch that solves this for me:
> [[[
> Index: build.conf
> ==========================================================
> =========
> --- build.conf (revision 986928)
> +++ build.conf (working copy)
> @@ -322,6 +322,7 @@
> private\svn_opt_private.h private\svn_skel.h private\svn_sqlite.h
> private\svn_utf_private.h private\svn_eol_private.h
> private\svn_token.h
> + private\svn_temp_serializer.h private\svn_file_handle_cache.h
>
> # Working copy management lib
> [libsvn_wc]
> ]]]

Looks like the right fix.

> 3) In function store_current_end_pointer in svn_temp_serializer_c,
> target_ptr needs to be declared before the statements.

Yes, this is required for C89 compatibility. (And VC is configured to check
for that even though it normally allows this case)

> 4) In temp_serializer.c, some of the sizeof statements gave problems for
me:
>
> ..\..\..\subversion\libsvn_fs_fs\temp_serializer.c(274): error C2057:
> expected constant expression
> ..\..\..\subversion\libsvn_fs_fs\temp_serializer.c(274): error C2466:
> cannot allocate an array of constant size 0
> ..\..\..\subversion\libsvn_fs_fs\temp_serializer.c(274): warning
> C4034: sizeof returns 0
> ..\..\..\subversion\libsvn_fs_fs\temp_serializer.c(424): error C2057:
> expected constant expression
> ..\..\..\subversion\libsvn_fs_fs\temp_serializer.c(424): error C2466:
> cannot allocate an array of constant size 0
> ..\..\..\subversion\libsvn_fs_fs\temp_serializer.c(424): warning
> C4034: sizeof returns 0
>
> I changed them as follows (not sure if this is correct, but this compiles
ok):
> [[[
> Index: subversion/libsvn_fs_fs/temp_serializer.c
> ==========================================================
> =========
> --- subversion/libsvn_fs_fs/temp_serializer.c (revision 986928)
> +++ subversion/libsvn_fs_fs/temp_serializer.c (working copy)
> @@ -271,7 +271,7 @@
>
> /* calculate sizes */
> apr_size_t count = apr_hash_count(entries);
> - apr_size_t entries_len = sizeof(svn_fs_dirent_t*[count]);
> + apr_size_t entries_len = sizeof(svn_fs_dirent_t*) * count;
>
> /* copy the hash entries to an auxilliary struct of known layout */
> hash_data.count = count;
> @@ -421,7 +421,7 @@
> /* the ops form a simple chunk of memory with no further references */
> svn_temp_serializer__push(context,
> (const void * const *)ops,
> - sizeof(svn_txdelta_op_t[count]));
> + sizeof(svn_txdelta_op_t) * count);
> svn_temp_serializer__pop(context);
> }
>
> ]]]

Looks ok.

> 5) Got the following error from mod_dav_svn/repos.c:
> ..\..\..\subversion\mod_dav_svn\repos.c(1522): error C4013:
> 'svn_ctype_isspace' undefined; assuming extern returning int
>
> Adding an #include "svn_ctype.h" fixed that, but I'm not too sure if
that's ok.

Should be ok.

> After these changes, I can get svn.exe to build. For svnadmin and
> svnserve, I still get linker errors like:
>
> main.obj : error LNK2019: unresolved external symbol
> _svn_fs_fs__set_cache_config referenced in function _main
> main.obj : error LNK2019: unresolved external symbol
> _svn_fs_fs__get_cache_config referenced in function _main
> ..\..\..\Debug\subversion\svnadmin\svnadmin.exe : fatal error LNK1120:
> 2 unresolved externals

I think this requires adding an additional dependency to svnadmin in
build.conf.
(My guess would be libsvn_fs_fs; but I can't look at the code right now)

@Stefan, can you apply these changes?

Thanks,
        Bert
Received on 2010-08-19 03:10:18 CEST

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.