approximate LRU in UFS

From: Adrian Chadd <adrian@dont-contact.us>
Date: Sun, 25 Mar 2001 00:53:42 +0800

ok, this is an evil idea, but hey..

We can take a storeentry, and figure out which L1/L2 directories
it sits in based on its swap_filen.

So, imagine assigning the LRU position to the actual L1+L2 directory.
Instead of holding each StoreEntry in an LRU, we hold the directories
in an LRU.

So, when we need space, we just pick the least-recently used
directory, which contains an average LRU of the entire dir, and
blow it away.

The trick here is to be able to delete an entire directory of
objects whilst deleting the relevant StoreEntry's. We can't lookup
a StoreEntry by swap_filen since the current index is by method/URL.
Can anyone think of a neat way to purge an entire directory
of objects *AND* the StoreEntry's of those objects at the same
time?

If we manage to do this, we'd be able to save quite a few bytes off
the StoreEntry struct..

Adrian

-- 
Adrian Chadd		"The fact you can download a 100 megabyte file
<adrian@creative.net.au>  from half way around the world should be viewed
			    as an accident and not a right."
					-- Adrian Chadd and Bill Fumerola
Received on Sat Mar 24 2001 - 09:53:47 MST

This archive was generated by hypermail pre-2.1.9 : Tue Dec 09 2003 - 16:13:40 MST