1. 03 Dec, 2008 2 commits
    • Poul-Henning Kamp's avatar
      Add preliminary version of lock-less tree based lookup (see below) · 877851aa
      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/varnish-cache@3454 d4fa192b-c00b-0410-8231-f00ffab90ce4
      877851aa
    • Poul-Henning Kamp's avatar
      Wrap some long lines · 4690e87a
      Poul-Henning Kamp authored
      
      
      git-svn-id: http://www.varnish-cache.org/svn/trunk/varnish-cache@3453 d4fa192b-c00b-0410-8231-f00ffab90ce4
      4690e87a
  2. 02 Dec, 2008 1 commit
    • Poul-Henning Kamp's avatar
      Fix an embarrasing bug in my Flexlinting of this code yesterday, and · 474f960c
      Poul-Henning Kamp authored
      add a couple of test-vectors to avoid it happening again.
      
      And now for the funny and educational story:
      
      In july of 1994, I added the "libmd" to FreeBSD, containing the
      MD2, MD4 and MD5 functions from RFC 1319, RFC 1186 and RFC1321.
      
      I meticulously replicated the test-vectors from the RFCs, so that
      "make test" would validate the result.
      
      Duing the intermediate 14 years, various slight shifts and adjustments
      to things like the make(1) programs defaults, the shared library
      resolution algorithm and other totally unrelated things, meant that
      "make test" now tests the installed version of the library, rather
      than the version you just built with "make all".
      
      Needless to say, when I tested my patch yesterday, I didn't install
      the built version, wanting first to hear what Colin Percival, FreeBSD
      Security Wiz, generally swell fella and the guy who wrote this
      SHA256 implementation, thought of these "stylistic" patches.
      
      
      
      git-svn-id: http://www.varnish-cache.org/svn/trunk/varnish-cache@3452 d4fa192b-c00b-0410-8231-f00ffab90ce4
      474f960c
  3. 01 Dec, 2008 5 commits
  4. 26 Nov, 2008 2 commits
  5. 25 Nov, 2008 12 commits
  6. 24 Nov, 2008 13 commits
  7. 22 Nov, 2008 1 commit
  8. 21 Nov, 2008 4 commits