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.
This commit is contained in:
Peter Wemm 1998-05-24 14:41:56 +00:00
parent d8ddb9a0ed
commit 0d7d0fcf29
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=36329
15 changed files with 86 additions and 102 deletions

View File

@ -34,7 +34,7 @@
* SUCH DAMAGE.
*
* @(#)nfs.h 8.4 (Berkeley) 5/1/95
* $Id: nfs.h,v 1.34 1998/03/30 09:53:43 phk Exp $
* $Id: nfs.h,v 1.35 1998/05/19 07:11:22 peter Exp $
*/
#ifndef _NFS_NFS_H_
@ -118,8 +118,6 @@
* to one that does not allocate space in powers of 2 size, then this all
* becomes bunk!)
*/
#define NFS_NODEALLOC 256
#define NFS_MNTALLOC 512
#define NFS_SVCALLOC 256
#define NFS_UIDALLOC 128
@ -307,13 +305,17 @@ union nethostaddr {
#ifdef MALLOC_DECLARE
MALLOC_DECLARE(M_NFSREQ);
MALLOC_DECLARE(M_NFSMNT);
MALLOC_DECLARE(M_NFSDIROFF);
MALLOC_DECLARE(M_NFSRVDESC);
MALLOC_DECLARE(M_NFSUID);
MALLOC_DECLARE(M_NQLEASE);
MALLOC_DECLARE(M_NFSD);
MALLOC_DECLARE(M_NFSBIGFH);
MALLOC_DECLARE(M_NFSHASH);
#endif
#ifdef ZONE_INTERRUPT
extern vm_zone_t nfsmount_zone;
#endif
struct uio; struct buf; struct vattr; struct nameidata; /* XXX */

View File

@ -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");

View File

@ -34,7 +34,7 @@
* SUCH DAMAGE.
*
* @(#)nfs_node.c 8.6 (Berkeley) 5/22/95
* $Id: nfs_node.c,v 1.25 1998/05/13 06:10:13 peter Exp $
* $Id: nfs_node.c,v 1.26 1998/05/13 07:49:08 peter Exp $
*/
@ -54,8 +54,7 @@
#include <nfs/nfsnode.h>
#include <nfs/nfsmount.h>
static MALLOC_DEFINE(M_NFSNODE, "NFS node", "NFS vnode private part");
static vm_zone_t nfsnode_zone;
static LIST_HEAD(nfsnodehashhead, nfsnode) *nfsnodehashtbl;
static u_long nfsnodehash;
@ -69,12 +68,8 @@ static u_long nfsnodehash;
void
nfs_nhinit()
{
#ifndef lint
if ((sizeof(struct nfsnode) - 1) & sizeof(struct nfsnode))
printf("nfs_nhinit: bad size %d\n", sizeof(struct nfsnode));
#endif /* not lint */
nfsnodehashtbl = hashinit(desiredvnodes, M_NFSNODE, &nfsnodehash);
nfsnode_zone = zinit("NFSNODE", sizeof(struct nfsnode), 0, 0, 1);
nfsnodehashtbl = hashinit(desiredvnodes, M_NFSHASH, &nfsnodehash);
}
/*
@ -144,11 +139,11 @@ nfs_nget(mntp, fhp, fhsize, npp)
nfs_node_hash_lock = 1;
/*
* Do the MALLOC before the getnewvnode since doing so afterward
* Allocate before getnewvnode since doing so afterward
* might cause a bogus v_data pointer to get dereferenced
* elsewhere if MALLOC should block.
* elsewhere if zalloc should block.
*/
MALLOC(np, struct nfsnode *, sizeof *np, M_NFSNODE, M_WAITOK);
np = zalloc(nfsnode_zone);
error = getnewvnode(VT_NFS, mntp, nfsv2_vnodeop_p, &nvp);
if (error) {
@ -156,7 +151,7 @@ nfs_nget(mntp, fhp, fhsize, npp)
wakeup(&nfs_node_hash_lock);
nfs_node_hash_lock = 0;
*npp = 0;
FREE(np, M_NFSNODE);
zfree(nfsnode_zone, np);
return (error);
}
vp = nvp;
@ -274,7 +269,7 @@ nfs_reclaim(ap)
}
cache_purge(vp);
FREE(vp->v_data, M_NFSNODE);
zfree(nfsnode_zone, vp->v_data);
vp->v_data = (void *)0;
return (0);
}

View File

@ -34,7 +34,7 @@
* SUCH DAMAGE.
*
* @(#)nfs_nqlease.c 8.9 (Berkeley) 5/20/95
* $Id: nfs_nqlease.c,v 1.33 1998/03/30 09:53:48 phk Exp $
* $Id: nfs_nqlease.c,v 1.34 1998/05/19 07:11:23 peter Exp $
*/
@ -63,6 +63,8 @@
#include <sys/socketvar.h>
#include <sys/protosw.h>
#include <vm/vm_zone.h>
#include <netinet/in.h>
#include <nfs/rpcv2.h>
#include <nfs/nfsproto.h>
@ -1166,7 +1168,7 @@ nqnfs_clientd(nmp, cred, ncd, flag, argp, p)
TAILQ_REMOVE(&nmp->nm_uidlruhead, nuidp, nu_lru);
free((caddr_t)nuidp, M_NFSUID);
}
free((caddr_t)nmp, M_NFSMNT);
zfree(nfsmount_zone, nmp);
if (error == EWOULDBLOCK)
error = 0;
return (error);

View File

@ -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");

View File

@ -34,7 +34,7 @@
* SUCH DAMAGE.
*
* @(#)nfs_vfsops.c 8.12 (Berkeley) 5/20/95
* $Id: nfs_vfsops.c,v 1.61 1998/05/20 08:02:24 peter Exp $
* $Id: nfs_vfsops.c,v 1.62 1998/05/20 08:05:45 peter Exp $
*/
#include <sys/param.h>
@ -52,6 +52,7 @@
#include <vm/vm.h>
#include <vm/vm_extern.h>
#include <vm/vm_zone.h>
#include <net/if.h>
#include <net/route.h>
@ -72,13 +73,15 @@ extern int nfs_mountroot __P((struct mount *mp));
extern int nfs_ticks;
MALLOC_DEFINE(M_NFSREQ, "NFS req", "NFS request header");
MALLOC_DEFINE(M_NFSMNT, "NFS mount", "NFS mount structure");
MALLOC_DEFINE(M_NFSBIGFH, "NFSV3 bigfh", "NFS version 3 file handle");
MALLOC_DEFINE(M_NFSD, "NFS daemon", "Nfs server daemon structure");
MALLOC_DEFINE(M_NFSDIROFF, "NFSV3 diroff", "NFS directory offset data");
MALLOC_DEFINE(M_NFSRVDESC, "NFSV3 srvdesc", "NFS server socket descriptor");
MALLOC_DEFINE(M_NFSUID, "NFS uid", "Nfs uid mapping structure");
MALLOC_DEFINE(M_NQLEASE, "NQNFS Lease", "Nqnfs lease");
MALLOC_DEFINE(M_NFSHASH, "NFS hash", "NFS hash tables");
vm_zone_t nfsmount_zone;
struct nfsstats nfsstats;
SYSCTL_NODE(_vfs, MOUNT_NFS, nfs, CTLFLAG_RW, 0, "NFS filesystem");
@ -670,8 +673,7 @@ mountnfs(argp, mp, nam, pth, hst, vpp)
FREE(nam, M_SONAME);
return (0);
} else {
MALLOC(nmp, struct nfsmount *, sizeof (struct nfsmount),
M_NFSMNT, M_WAITOK);
nmp = zalloc(nfsmount_zone);
bzero((caddr_t)nmp, sizeof (struct nfsmount));
TAILQ_INIT(&nmp->nm_uidlruhead);
TAILQ_INIT(&nmp->nm_bufq);
@ -849,7 +851,7 @@ mountnfs(argp, mp, nam, pth, hst, vpp)
return (0);
bad:
nfs_disconnect(nmp);
free((caddr_t)nmp, M_NFSMNT);
zfree(nfsmount_zone, nmp);
FREE(nam, M_SONAME);
return (error);
}
@ -924,7 +926,7 @@ nfs_unmount(mp, mntflags, p)
FREE(nmp->nm_nam, M_SONAME);
if ((nmp->nm_flag & (NFSMNT_NQNFS | NFSMNT_KERB)) == 0)
free((caddr_t)nmp, M_NFSMNT);
zfree(nfsmount_zone, nmp);
return (0);
}

View File

@ -34,7 +34,7 @@
* SUCH DAMAGE.
*
* @(#)nfs.h 8.4 (Berkeley) 5/1/95
* $Id: nfs.h,v 1.34 1998/03/30 09:53:43 phk Exp $
* $Id: nfs.h,v 1.35 1998/05/19 07:11:22 peter Exp $
*/
#ifndef _NFS_NFS_H_
@ -118,8 +118,6 @@
* to one that does not allocate space in powers of 2 size, then this all
* becomes bunk!)
*/
#define NFS_NODEALLOC 256
#define NFS_MNTALLOC 512
#define NFS_SVCALLOC 256
#define NFS_UIDALLOC 128
@ -307,13 +305,17 @@ union nethostaddr {
#ifdef MALLOC_DECLARE
MALLOC_DECLARE(M_NFSREQ);
MALLOC_DECLARE(M_NFSMNT);
MALLOC_DECLARE(M_NFSDIROFF);
MALLOC_DECLARE(M_NFSRVDESC);
MALLOC_DECLARE(M_NFSUID);
MALLOC_DECLARE(M_NQLEASE);
MALLOC_DECLARE(M_NFSD);
MALLOC_DECLARE(M_NFSBIGFH);
MALLOC_DECLARE(M_NFSHASH);
#endif
#ifdef ZONE_INTERRUPT
extern vm_zone_t nfsmount_zone;
#endif
struct uio; struct buf; struct vattr; struct nameidata; /* XXX */

View File

@ -34,7 +34,7 @@
* SUCH DAMAGE.
*
* @(#)nfs_node.c 8.6 (Berkeley) 5/22/95
* $Id: nfs_node.c,v 1.25 1998/05/13 06:10:13 peter Exp $
* $Id: nfs_node.c,v 1.26 1998/05/13 07:49:08 peter Exp $
*/
@ -54,8 +54,7 @@
#include <nfs/nfsnode.h>
#include <nfs/nfsmount.h>
static MALLOC_DEFINE(M_NFSNODE, "NFS node", "NFS vnode private part");
static vm_zone_t nfsnode_zone;
static LIST_HEAD(nfsnodehashhead, nfsnode) *nfsnodehashtbl;
static u_long nfsnodehash;
@ -69,12 +68,8 @@ static u_long nfsnodehash;
void
nfs_nhinit()
{
#ifndef lint
if ((sizeof(struct nfsnode) - 1) & sizeof(struct nfsnode))
printf("nfs_nhinit: bad size %d\n", sizeof(struct nfsnode));
#endif /* not lint */
nfsnodehashtbl = hashinit(desiredvnodes, M_NFSNODE, &nfsnodehash);
nfsnode_zone = zinit("NFSNODE", sizeof(struct nfsnode), 0, 0, 1);
nfsnodehashtbl = hashinit(desiredvnodes, M_NFSHASH, &nfsnodehash);
}
/*
@ -144,11 +139,11 @@ nfs_nget(mntp, fhp, fhsize, npp)
nfs_node_hash_lock = 1;
/*
* Do the MALLOC before the getnewvnode since doing so afterward
* Allocate before getnewvnode since doing so afterward
* might cause a bogus v_data pointer to get dereferenced
* elsewhere if MALLOC should block.
* elsewhere if zalloc should block.
*/
MALLOC(np, struct nfsnode *, sizeof *np, M_NFSNODE, M_WAITOK);
np = zalloc(nfsnode_zone);
error = getnewvnode(VT_NFS, mntp, nfsv2_vnodeop_p, &nvp);
if (error) {
@ -156,7 +151,7 @@ nfs_nget(mntp, fhp, fhsize, npp)
wakeup(&nfs_node_hash_lock);
nfs_node_hash_lock = 0;
*npp = 0;
FREE(np, M_NFSNODE);
zfree(nfsnode_zone, np);
return (error);
}
vp = nvp;
@ -274,7 +269,7 @@ nfs_reclaim(ap)
}
cache_purge(vp);
FREE(vp->v_data, M_NFSNODE);
zfree(nfsnode_zone, vp->v_data);
vp->v_data = (void *)0;
return (0);
}

View File

@ -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");

View File

@ -34,7 +34,7 @@
* SUCH DAMAGE.
*
* @(#)nfs_vfsops.c 8.12 (Berkeley) 5/20/95
* $Id: nfs_vfsops.c,v 1.61 1998/05/20 08:02:24 peter Exp $
* $Id: nfs_vfsops.c,v 1.62 1998/05/20 08:05:45 peter Exp $
*/
#include <sys/param.h>
@ -52,6 +52,7 @@
#include <vm/vm.h>
#include <vm/vm_extern.h>
#include <vm/vm_zone.h>
#include <net/if.h>
#include <net/route.h>
@ -72,13 +73,15 @@ extern int nfs_mountroot __P((struct mount *mp));
extern int nfs_ticks;
MALLOC_DEFINE(M_NFSREQ, "NFS req", "NFS request header");
MALLOC_DEFINE(M_NFSMNT, "NFS mount", "NFS mount structure");
MALLOC_DEFINE(M_NFSBIGFH, "NFSV3 bigfh", "NFS version 3 file handle");
MALLOC_DEFINE(M_NFSD, "NFS daemon", "Nfs server daemon structure");
MALLOC_DEFINE(M_NFSDIROFF, "NFSV3 diroff", "NFS directory offset data");
MALLOC_DEFINE(M_NFSRVDESC, "NFSV3 srvdesc", "NFS server socket descriptor");
MALLOC_DEFINE(M_NFSUID, "NFS uid", "Nfs uid mapping structure");
MALLOC_DEFINE(M_NQLEASE, "NQNFS Lease", "Nqnfs lease");
MALLOC_DEFINE(M_NFSHASH, "NFS hash", "NFS hash tables");
vm_zone_t nfsmount_zone;
struct nfsstats nfsstats;
SYSCTL_NODE(_vfs, MOUNT_NFS, nfs, CTLFLAG_RW, 0, "NFS filesystem");
@ -670,8 +673,7 @@ mountnfs(argp, mp, nam, pth, hst, vpp)
FREE(nam, M_SONAME);
return (0);
} else {
MALLOC(nmp, struct nfsmount *, sizeof (struct nfsmount),
M_NFSMNT, M_WAITOK);
nmp = zalloc(nfsmount_zone);
bzero((caddr_t)nmp, sizeof (struct nfsmount));
TAILQ_INIT(&nmp->nm_uidlruhead);
TAILQ_INIT(&nmp->nm_bufq);
@ -849,7 +851,7 @@ mountnfs(argp, mp, nam, pth, hst, vpp)
return (0);
bad:
nfs_disconnect(nmp);
free((caddr_t)nmp, M_NFSMNT);
zfree(nfsmount_zone, nmp);
FREE(nam, M_SONAME);
return (error);
}
@ -924,7 +926,7 @@ nfs_unmount(mp, mntflags, p)
FREE(nmp->nm_nam, M_SONAME);
if ((nmp->nm_flag & (NFSMNT_NQNFS | NFSMNT_KERB)) == 0)
free((caddr_t)nmp, M_NFSMNT);
zfree(nfsmount_zone, nmp);
return (0);
}

View File

@ -34,7 +34,7 @@
* SUCH DAMAGE.
*
* @(#)nfs.h 8.4 (Berkeley) 5/1/95
* $Id: nfs.h,v 1.34 1998/03/30 09:53:43 phk Exp $
* $Id: nfs.h,v 1.35 1998/05/19 07:11:22 peter Exp $
*/
#ifndef _NFS_NFS_H_
@ -118,8 +118,6 @@
* to one that does not allocate space in powers of 2 size, then this all
* becomes bunk!)
*/
#define NFS_NODEALLOC 256
#define NFS_MNTALLOC 512
#define NFS_SVCALLOC 256
#define NFS_UIDALLOC 128
@ -307,13 +305,17 @@ union nethostaddr {
#ifdef MALLOC_DECLARE
MALLOC_DECLARE(M_NFSREQ);
MALLOC_DECLARE(M_NFSMNT);
MALLOC_DECLARE(M_NFSDIROFF);
MALLOC_DECLARE(M_NFSRVDESC);
MALLOC_DECLARE(M_NFSUID);
MALLOC_DECLARE(M_NQLEASE);
MALLOC_DECLARE(M_NFSD);
MALLOC_DECLARE(M_NFSBIGFH);
MALLOC_DECLARE(M_NFSHASH);
#endif
#ifdef ZONE_INTERRUPT
extern vm_zone_t nfsmount_zone;
#endif
struct uio; struct buf; struct vattr; struct nameidata; /* XXX */

View File

@ -34,7 +34,7 @@
* SUCH DAMAGE.
*
* @(#)nfs.h 8.4 (Berkeley) 5/1/95
* $Id: nfs.h,v 1.34 1998/03/30 09:53:43 phk Exp $
* $Id: nfs.h,v 1.35 1998/05/19 07:11:22 peter Exp $
*/
#ifndef _NFS_NFS_H_
@ -118,8 +118,6 @@
* to one that does not allocate space in powers of 2 size, then this all
* becomes bunk!)
*/
#define NFS_NODEALLOC 256
#define NFS_MNTALLOC 512
#define NFS_SVCALLOC 256
#define NFS_UIDALLOC 128
@ -307,13 +305,17 @@ union nethostaddr {
#ifdef MALLOC_DECLARE
MALLOC_DECLARE(M_NFSREQ);
MALLOC_DECLARE(M_NFSMNT);
MALLOC_DECLARE(M_NFSDIROFF);
MALLOC_DECLARE(M_NFSRVDESC);
MALLOC_DECLARE(M_NFSUID);
MALLOC_DECLARE(M_NQLEASE);
MALLOC_DECLARE(M_NFSD);
MALLOC_DECLARE(M_NFSBIGFH);
MALLOC_DECLARE(M_NFSHASH);
#endif
#ifdef ZONE_INTERRUPT
extern vm_zone_t nfsmount_zone;
#endif
struct uio; struct buf; struct vattr; struct nameidata; /* XXX */

View File

@ -34,7 +34,7 @@
* SUCH DAMAGE.
*
* @(#)nfs.h 8.4 (Berkeley) 5/1/95
* $Id: nfs.h,v 1.34 1998/03/30 09:53:43 phk Exp $
* $Id: nfs.h,v 1.35 1998/05/19 07:11:22 peter Exp $
*/
#ifndef _NFS_NFS_H_
@ -118,8 +118,6 @@
* to one that does not allocate space in powers of 2 size, then this all
* becomes bunk!)
*/
#define NFS_NODEALLOC 256
#define NFS_MNTALLOC 512
#define NFS_SVCALLOC 256
#define NFS_UIDALLOC 128
@ -307,13 +305,17 @@ union nethostaddr {
#ifdef MALLOC_DECLARE
MALLOC_DECLARE(M_NFSREQ);
MALLOC_DECLARE(M_NFSMNT);
MALLOC_DECLARE(M_NFSDIROFF);
MALLOC_DECLARE(M_NFSRVDESC);
MALLOC_DECLARE(M_NFSUID);
MALLOC_DECLARE(M_NQLEASE);
MALLOC_DECLARE(M_NFSD);
MALLOC_DECLARE(M_NFSBIGFH);
MALLOC_DECLARE(M_NFSHASH);
#endif
#ifdef ZONE_INTERRUPT
extern vm_zone_t nfsmount_zone;
#endif
struct uio; struct buf; struct vattr; struct nameidata; /* XXX */

View File

@ -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");

View File

@ -34,7 +34,7 @@
* SUCH DAMAGE.
*
* @(#)nfs.h 8.4 (Berkeley) 5/1/95
* $Id: nfs.h,v 1.34 1998/03/30 09:53:43 phk Exp $
* $Id: nfs.h,v 1.35 1998/05/19 07:11:22 peter Exp $
*/
#ifndef _NFS_NFS_H_
@ -118,8 +118,6 @@
* to one that does not allocate space in powers of 2 size, then this all
* becomes bunk!)
*/
#define NFS_NODEALLOC 256
#define NFS_MNTALLOC 512
#define NFS_SVCALLOC 256
#define NFS_UIDALLOC 128
@ -307,13 +305,17 @@ union nethostaddr {
#ifdef MALLOC_DECLARE
MALLOC_DECLARE(M_NFSREQ);
MALLOC_DECLARE(M_NFSMNT);
MALLOC_DECLARE(M_NFSDIROFF);
MALLOC_DECLARE(M_NFSRVDESC);
MALLOC_DECLARE(M_NFSUID);
MALLOC_DECLARE(M_NQLEASE);
MALLOC_DECLARE(M_NFSD);
MALLOC_DECLARE(M_NFSBIGFH);
MALLOC_DECLARE(M_NFSHASH);
#endif
#ifdef ZONE_INTERRUPT
extern vm_zone_t nfsmount_zone;
#endif
struct uio; struct buf; struct vattr; struct nameidata; /* XXX */