]> git.baikalelectronics.ru Git - kernel.git/commit
nfsd: keep stats on worst hash balancing seen so far
authorJeff Layton <jlayton@redhat.com>
Wed, 27 Mar 2013 14:15:39 +0000 (10:15 -0400)
committerJ. Bruce Fields <bfields@redhat.com>
Wed, 3 Apr 2013 15:47:25 +0000 (11:47 -0400)
commit464c60a9c9de95480edddf163091529de7cc1e3f
treec369d29f8c0599830f900049eb6ed49b9f9ccfc7
parentaf019f8c286fa10ff5a6fae3c84a0d1a718dec14
nfsd: keep stats on worst hash balancing seen so far

The typical case with the DRC is a cache miss, so if we keep track of
the max number of entries that we've ever walked over in a search, then
we should have a reasonable estimate of the longest hash chain that
we've ever seen.

With that, we'll also keep track of the total size of the cache when we
see the longest chain. In the case of a tie, we prefer to track the
smallest total cache size in order to properly gauge the worst-case
ratio of max vs. avg chain length.

Signed-off-by: Jeff Layton <jlayton@redhat.com>
Signed-off-by: J. Bruce Fields <bfields@redhat.com>
fs/nfsd/nfscache.c