SUNRPC: Make the credential cache hashtable size configurable
This patch allows the user to configure the credential cache hashtable size using a new module parameter: auth_hashtable_size When set, this parameter will be rounded up to the nearest power of two, with a maximum allowed value of 1024 elements. Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
This commit is contained in:
parent
988664a0f6
commit
241269bd0b
2 changed files with 56 additions and 13 deletions
|
|
@ -61,14 +61,7 @@ struct rpc_cred {
|
|||
/*
|
||||
* Client authentication handle
|
||||
*/
|
||||
#define RPC_CREDCACHE_HASHBITS 4
|
||||
#define RPC_CREDCACHE_NR (1 << RPC_CREDCACHE_HASHBITS)
|
||||
struct rpc_cred_cache {
|
||||
struct hlist_head hashtable[RPC_CREDCACHE_NR];
|
||||
unsigned int hashbits;
|
||||
spinlock_t lock;
|
||||
};
|
||||
|
||||
struct rpc_cred_cache;
|
||||
struct rpc_authops;
|
||||
struct rpc_auth {
|
||||
unsigned int au_cslack; /* call cred size estimate */
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue