> linux/fs/xfs/pagebuf/page_buf.c - 1.94
> - base the number of hash buckets for xfs metadata on the amount of
> memory in the system, and use the same hash algorithm as the
> regular buffer cache.
Hi,
I cannot review the change because it hasn't reached the public
CVS server yet. But in general I would be very careful with existing
hash functions in Linux. Lots of them are suffering from the
"i don't use a prime modulo, but some cheap binary modulo" problem,
causing bad hashing, which is normally papered around with making the
cache size resizing overly aggressive, guaranteeing slow cache misses
when the hash table is accessed.
e.g.
Buffer-cache hash table entries: 65536 (order: 6, 262144 bytes)
That's far too big, definitely guaranteeing cache misses for most
bucket accesses even on an Itanium 2 ;)
Probably you're better off with a much smaller table and a better hash function
using primes.
-Andi
|