afs: Increase vcache and dcache hash table sizes
Now that we are using a real hash function, larger hash tables
will be more useful.
The vcache hash tables are statically sized, and this increase will
add about a megabyte to the kernel module's memory footprint.
Update the algorithm used to dynamically size the dcache hash tables,
keeping the old behavior for small numbers of dcaches, but growing
the hash table's size to keep the average chain length near two
for a range of dcache numbers. Cap the dcache hash tables at 32k
entries to avoid excessive resource usage.
This involves code from opr, namely opr/ffs.h, which is acceptable
in the kernel module because that header is a standalone header
like jhash.h, with no dependencies on the system.
Change-Id: I7cdb3e993b1c2ad177a46ecc06bfa2be52e619e5
Reviewed-on: http://gerrit.openafs.org/11679
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
Tested-by: Benjamin Kaduk <kaduk@mit.edu>