diff options
author | Andy Adamson <andros@netapp.com> | 2009-07-27 19:09:19 -0400 |
---|---|---|
committer | J. Bruce Fields <bfields@citi.umich.edu> | 2009-07-28 14:30:05 -0400 |
commit | 0c193054a4c1cf190d2f23e5e91bd14402e43912 (patch) | |
tree | f2fc6efa35b0cfa621b43894e2dfd57762e65d0f /fs/nfsd/nfssvc.c | |
parent | 6a14dd1a4fe1bd00e02a96c97015cedfddda58ed (diff) |
nfsd41: hange from page to memory based drc limits
NFSD_SLOT_CACHE_SIZE is the size of all encoded operation responses
(excluding the sequence operation) that we want to cache.
For now, keep NFSD_SLOT_CACHE_SIZE at PAGE_SIZE. It will be reduced
when the DRC is changed from page based to memory based.
Signed-off-by: Andy Adamson <andros@netapp.com>
Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu>
Diffstat (limited to 'fs/nfsd/nfssvc.c')
-rw-r--r-- | fs/nfsd/nfssvc.c | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/fs/nfsd/nfssvc.c b/fs/nfsd/nfssvc.c index 9be2a1932f8a..5a280a9cb540 100644 --- a/fs/nfsd/nfssvc.c +++ b/fs/nfsd/nfssvc.c | |||
@@ -74,8 +74,8 @@ struct svc_serv *nfsd_serv; | |||
74 | * nfsd_drc_pages_used tracks the current version 4.1 DRC memory usage. | 74 | * nfsd_drc_pages_used tracks the current version 4.1 DRC memory usage. |
75 | */ | 75 | */ |
76 | spinlock_t nfsd_drc_lock; | 76 | spinlock_t nfsd_drc_lock; |
77 | unsigned int nfsd_drc_max_pages; | 77 | unsigned int nfsd_drc_max_mem; |
78 | unsigned int nfsd_drc_pages_used; | 78 | unsigned int nfsd_drc_mem_used; |
79 | 79 | ||
80 | #if defined(CONFIG_NFSD_V2_ACL) || defined(CONFIG_NFSD_V3_ACL) | 80 | #if defined(CONFIG_NFSD_V2_ACL) || defined(CONFIG_NFSD_V3_ACL) |
81 | static struct svc_stat nfsd_acl_svcstats; | 81 | static struct svc_stat nfsd_acl_svcstats; |
@@ -247,12 +247,11 @@ void nfsd_reset_versions(void) | |||
247 | static void set_max_drc(void) | 247 | static void set_max_drc(void) |
248 | { | 248 | { |
249 | #define NFSD_DRC_SIZE_SHIFT 10 | 249 | #define NFSD_DRC_SIZE_SHIFT 10 |
250 | nfsd_drc_max_pages = nr_free_buffer_pages() | 250 | nfsd_drc_max_mem = (nr_free_buffer_pages() |
251 | >> NFSD_DRC_SIZE_SHIFT; | 251 | >> NFSD_DRC_SIZE_SHIFT) * PAGE_SIZE; |
252 | nfsd_drc_pages_used = 0; | 252 | nfsd_drc_mem_used = 0; |
253 | spin_lock_init(&nfsd_drc_lock); | 253 | spin_lock_init(&nfsd_drc_lock); |
254 | dprintk("%s nfsd_drc_max_pages %u\n", __func__, | 254 | dprintk("%s nfsd_drc_max_mem %u \n", __func__, nfsd_drc_max_mem); |
255 | nfsd_drc_max_pages); | ||
256 | } | 255 | } |
257 | 256 | ||
258 | int nfsd_create_serv(void) | 257 | int nfsd_create_serv(void) |