]> err.no Git - varnish/commit
Mostly finish the LRU code and its integration:
authordes <des@d4fa192b-c00b-0410-8231-f00ffab90ce4>
Wed, 27 Jun 2007 12:56:04 +0000 (12:56 +0000)
committerdes <des@d4fa192b-c00b-0410-8231-f00ffab90ce4>
Wed, 27 Jun 2007 12:56:04 +0000 (12:56 +0000)
commita5dba47b13358d20beabad0ee4b6e0ea6e76ad60
tree1be4d9af4d51b16ff376c7f56afc6c0ae0352dbc
parentff3cf65966a23d315189bad00ae54283f402fc11
Mostly finish the LRU code and its integration:

 - Wrap the storage code so we don't need to duplicate the "toss out some old
   crap and try again" logic everywhere.  This will also help when / if we
   decide to add support for multiple concurrent storage arenas.

 - While I'm at it, implement sma_trim().

 - Rework the interaction between the LRU and expiry code.  Instead of placing
   objects retired by the LRU on death row, immediately terminate them.

 - Give the LRU code its own fake session and worker so we don't have to pass
   it a session pointer.

 - Rework the LRU API, and add LRU_DiscardOne() which discards a single
   object.  This is what the stevedore code uses.

Known or suspected issues:

 - The LRU and expiry code should use the same mutex, and / or the possiblity
   for races between them should be examined closely.

 - LRU_Init() needs to be looked at and possibly moved.

 - LRU_DiscardSpace() and LRU_DiscardTime() are unused and quite possibly useless.

 - Logging and statistics related to the LRU need more attention.

 - The stevedore API can probably be improved.

git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@1586 d4fa192b-c00b-0410-8231-f00ffab90ce4
12 files changed:
varnish-cache/bin/varnishd/Makefile.am
varnish-cache/bin/varnishd/cache.h
varnish-cache/bin/varnishd/cache_expire.c
varnish-cache/bin/varnishd/cache_fetch.c
varnish-cache/bin/varnishd/cache_hash.c
varnish-cache/bin/varnishd/cache_lru.c
varnish-cache/bin/varnishd/cache_synthetic.c
varnish-cache/bin/varnishd/stevedore.c [new file with mode: 0644]
varnish-cache/bin/varnishd/stevedore.h
varnish-cache/bin/varnishd/storage_file.c
varnish-cache/bin/varnishd/storage_malloc.c
varnish-cache/include/shmlog_tags.h