Re: [PATCH][RFC] slabnow

Daniel Phillips
2002-09-08T20:45:19Z

On Saturday 07 September 2002 16:06, Ed Tomlinson wrote:
> + /*
> + * Here we assume it costs one seek to replace a lru page and that
> + * it also takes a seek to recreate a cache object. With this in
> + * mind we age equal percentages of the lru and ageable caches.
> + * This should balance the seeks generated by these structures.
> + */

It's not a reliable assumption, for example, what is the relation between an
skbuff and a disk seek? Still, a better model need not be much different
from what you've done - simply pick an arbitrary unit against which you
estimate the average cost of replacing one unit of a given slab, and plug
that a ratios against that into each slab header. Make the default
1*DISK_SEEK_COST and you will get the current behaviour, then tune the things
that are obviously broken.

By the way, ratio multiplication is a *basic* and essential tool of any
control system worthy of the name, it's too bad Linux is so horribly
lacking in that department. (Life without double-length intermediate
muldiv results is not worth living.)

--
Daniel