The expiry module keeps all cached objects on two data structures:
the LRU list and the binary heap. In both of these cases, operations
on one object will result in certain fields in neighbor objects in
these data structures to be updated.
In difference from cache_hash.c which examine objects related by
hash match where the existence of the hash lookup in the first place
is a predictor for their likely use, in cache_expire the neighbor
objects are totally unrelated and the fact that we update their
list pointers or binheap index in no way indicates that they will
get a cache hit any time soon.
Paging in one page for a number of objects, just to move another
object up or down the binheap or LRU list is thus not only slow,
but also increases varnish' VM footprint for no real benefit.
This commit moves the relevant housekeeping fields into a "objexp"
structure, which gets hung off the objects when they enter the cache.
The objexp structure is small (40 bytes on i386) so statistically it
is more than an order of magnitude more likely to already be in core
when we need it, compared to the object itself.
git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@2537
d4fa192b-c00b-0410-8231-
f00ffab90ce4