summaryrefslogtreecommitdiffstats
path: root/sys/nfsclient/nfs_subs.c
diff options
context:
space:
mode:
authorpeter <peter@FreeBSD.org>1998-05-24 14:41:56 +0000
committerpeter <peter@FreeBSD.org>1998-05-24 14:41:56 +0000
commit6d06da81011cebd1efc4dae1d6d0ed94af6f9f76 (patch)
treea7d0873d8bee7b3560ff38fa06bed1c742b6c0a1 /sys/nfsclient/nfs_subs.c
parentc9dd9f41486532c8fa517b5d63ccc208e00fb8cd (diff)
downloadFreeBSD-src-6d06da81011cebd1efc4dae1d6d0ed94af6f9f76.zip
FreeBSD-src-6d06da81011cebd1efc4dae1d6d0ed94af6f9f76.tar.gz
Convert a couple of large allocations to use zones rather than malloc
for better packing. This means that we can choose better values for the various hash entries without having to try and get it all to fit within an artificial power of two limit for malloc's sake.
Diffstat (limited to 'sys/nfsclient/nfs_subs.c')
-rw-r--r--sys/nfsclient/nfs_subs.c12
1 files changed, 3 insertions, 9 deletions
diff --git a/sys/nfsclient/nfs_subs.c b/sys/nfsclient/nfs_subs.c
index b81eedf..93fca3c 100644
--- a/sys/nfsclient/nfs_subs.c
+++ b/sys/nfsclient/nfs_subs.c
@@ -34,7 +34,7 @@
* SUCH DAMAGE.
*
* @(#)nfs_subs.c 8.3 (Berkeley) 1/4/94
- * $Id: nfs_subs.c,v 1.53 1998/04/06 11:41:07 phk Exp $
+ * $Id: nfs_subs.c,v 1.54 1998/05/19 07:11:24 peter Exp $
*/
/*
@@ -1099,17 +1099,11 @@ nfs_init(vfsp)
{
register int i;
+ nfsmount_zone = zinit("NFSMOUNT", sizeof(struct nfsmount), 0, 0, 1);
+
/*
* Check to see if major data structures haven't bloated.
*/
- if (sizeof (struct nfsnode) > NFS_NODEALLOC) {
- printf("struct nfsnode bloated (> %dbytes)\n", NFS_NODEALLOC);
- printf("Try reducing NFS_SMALLFH\n");
- }
- if (sizeof (struct nfsmount) > NFS_MNTALLOC) {
- printf("struct nfsmount bloated (> %dbytes)\n", NFS_MNTALLOC);
- printf("Try reducing NFS_MUIDHASHSIZ\n");
- }
if (sizeof (struct nfssvc_sock) > NFS_SVCALLOC) {
printf("struct nfssvc_sock bloated (> %dbytes)\n",NFS_SVCALLOC);
printf("Try reducing NFS_UIDHASHSIZ\n");
OpenPOWER on IntegriCloud