• NeilBrown's avatar
    knfsd: Remove NLM_HOST_MAX and associated logic. · 1447d25e
    NeilBrown authored
    Lockd caches information about hosts that have recently held locks to
    expedite the taking of further locks.
    
    It periodically discards this information for hosts that have not been
    used for a few minutes.
    
    lockd currently has a value NLM_HOST_MAX, and changes the 'garbage
    collection' behaviour when the number of hosts exceeds this threshold.
    
    However its behaviour is strange, and likely not what was intended.
    When the number of hosts exceeds the max, it scans *less* often (every
    2 minutes vs every minute) and allows unused host information to
    remain around longer (5 minutes instead of 2).
    
    Having this limit is of dubious value anyway, and we have not
    suffered from the code not getting the limit right, so remove the
    limit altogether.  We go with the larger values (discard 5 minute old
    hosts every 2 minutes) as they are probably safer.
    
    Maybe the periodic garbage collection should be replace to with
    'shrinker' handler so we just respond to memory pressure....
    Acked-by: default avatarJeff Layton <jlayton@redhat.com>
    Signed-off-by: default avatarNeil Brown <neilb@suse.de>
    Signed-off-by: default avatarJ. Bruce Fields <bfields@citi.umich.edu>
    1447d25e
host.c 13.2 KB