• Jeff Layton's avatar
    nfsd: keep stats on worst hash balancing seen so far · 98d821bd
    Jeff Layton authored
    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: default avatarJeff Layton <jlayton@redhat.com>
    Signed-off-by: default avatarJ. Bruce Fields <bfields@redhat.com>
    98d821bd
nfscache.c 15.3 KB