• Poul-Henning Kamp's avatar
    Add preliminary version of lock-less tree based lookup (see below) · 406186fa
    Poul-Henning Kamp authored
    Enable SHA256 digests by default, and put it in the objhead.  This
    increases the size of the objhead by 32 bytes, but may drop
    a bit again later, when other now unnecessary fields go away.
    
    Test SHA256 for correct operation on startup.
    
    About the "critbit" lookup:
    
    To enable this, use "-hcritbit" argument.
    
    "Crit Bit" trees, are also known under various other names, the original
    version of the idea is probably the PATRICIA tree.
    
    The basic concept is a tree structure which has nodes only where necessary
    to tell the indices apart.
    
    Our version of it, has some additional bells and whistles.
    
    First lookups do not require any locks until we reach the objhead
    we were looking for, or until we need to insert one which wasn't
    there.
    
    Second, the branch nodes are part of the objhead, as all but the
    very first will need one, this saves malloc operations big time.
    
    Now the down-sides:
    
    There are still missing bits, amongst these the "cooling off" list,
    for objheads that have been dereferenced, but where the branch-node
    is not.  Currently we just leak that memory.
    
    There is a race relating to node deref and unlocked lookup that is
    not closed, weird things may happen until I fix it.
    
    I'd be interested to hear how long it survives before it croaks,
    but apart from that, would not advocate that you use it, until
    I fix those remaining issues.
    
    
    
    git-svn-id: http://www.varnish-cache.org/svn/trunk@3454 d4fa192b-c00b-0410-8231-f00ffab90ce4
    406186fa
Name
Last commit
Last update
..
compat Loading commit data...
Makefile.am Loading commit data...
binary_heap.h Loading commit data...
cli.h Loading commit data...
cli_common.h Loading commit data...
cli_priv.h Loading commit data...
flopen.h Loading commit data...
http_headers.h Loading commit data...
http_response.h Loading commit data...
libvarnish.h Loading commit data...
libvcl.h Loading commit data...
miniobj.h Loading commit data...
shmlog.h Loading commit data...
shmlog_tags.h Loading commit data...
stat_field.h Loading commit data...
stats.h Loading commit data...
varnishapi.h Loading commit data...
vbm.h Loading commit data...
vcl.h Loading commit data...
vcl_returns.h Loading commit data...
vct.h Loading commit data...
vev.h Loading commit data...
vlu.h Loading commit data...
vpf.h Loading commit data...
vqueue.h Loading commit data...
vrt.h Loading commit data...
vrt_obj.h Loading commit data...
vsb.h Loading commit data...
vsha256.h Loading commit data...
vss.h Loading commit data...