diff options
| author | Andy Adamson <andros@netapp.com> | 2009-08-28 08:45:01 -0400 |
|---|---|---|
| committer | J. Bruce Fields <bfields@citi.umich.edu> | 2009-09-01 22:24:05 -0400 |
| commit | a649637c73a36174287a403cdda7607177d64523 (patch) | |
| tree | 8aec8e30b2f4cceaee9fa5ddaa88e694ea3e09dd /include/linux | |
| parent | a06b1261bdb580b35967d0e055d1ab131b332254 (diff) | |
nfsd41: bound forechannel drc size by memory usage
By using the requested ca_maxresponsesize_cached * ca_maxresponses to bound
a forechannel drc request size, clients can tailor a session to usage.
For example, an I/O session (READ/WRITE only) can have a much smaller
ca_maxresponsesize_cached (for only WRITE compound responses) and a lot larger
ca_maxresponses to service a large in-flight data window.
Signed-off-by: Andy Adamson <andros@netapp.com>
Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu>
Diffstat (limited to 'include/linux')
| -rw-r--r-- | include/linux/nfsd/state.h | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/include/linux/nfsd/state.h b/include/linux/nfsd/state.h index fb0c404c7c5c..ff0b771efde6 100644 --- a/include/linux/nfsd/state.h +++ b/include/linux/nfsd/state.h | |||
| @@ -92,13 +92,17 @@ struct nfs4_cb_conn { | |||
| 92 | struct rpc_cred * cb_cred; | 92 | struct rpc_cred * cb_cred; |
| 93 | }; | 93 | }; |
| 94 | 94 | ||
| 95 | /* Maximum number of slots per session. 128 is useful for long haul TCP */ | 95 | /* Maximum number of slots per session. 160 is useful for long haul TCP */ |
| 96 | #define NFSD_MAX_SLOTS_PER_SESSION 128 | 96 | #define NFSD_MAX_SLOTS_PER_SESSION 160 |
| 97 | /* Maximum number of pages per slot cache entry */ | 97 | /* Maximum number of pages per slot cache entry */ |
| 98 | #define NFSD_PAGES_PER_SLOT 1 | 98 | #define NFSD_PAGES_PER_SLOT 1 |
| 99 | #define NFSD_SLOT_CACHE_SIZE PAGE_SIZE | 99 | #define NFSD_SLOT_CACHE_SIZE PAGE_SIZE |
| 100 | /* Maximum number of operations per session compound */ | 100 | /* Maximum number of operations per session compound */ |
| 101 | #define NFSD_MAX_OPS_PER_COMPOUND 16 | 101 | #define NFSD_MAX_OPS_PER_COMPOUND 16 |
| 102 | /* Maximum number of NFSD_SLOT_CACHE_SIZE slots per session */ | ||
| 103 | #define NFSD_CACHE_SIZE_SLOTS_PER_SESSION 32 | ||
| 104 | #define NFSD_MAX_MEM_PER_SESSION \ | ||
| 105 | (NFSD_CACHE_SIZE_SLOTS_PER_SESSION * NFSD_SLOT_CACHE_SIZE) | ||
| 102 | 106 | ||
| 103 | struct nfsd4_cache_entry { | 107 | struct nfsd4_cache_entry { |
| 104 | __be32 ce_status; | 108 | __be32 ce_status; |
