mbuf size and NFS
Martin Karsten
mkarsten at cs.uwaterloo.ca
Wed Jun 7 12:40:22 PDT 2006
Some time ago I wanted to do experiments with a reduced mbuf size, just
for the sake of it. Changing MSIZE (to 128 in this case) and recompiling
the kernel seemed to do the job, although I only tested fairly standard
functionality. This was on a 5.4-RELEASE system.
However, I noticed one problem with NFS which seems to be easily
fixable. The following patch is for
src/sys/nfs/nfs_common.c,v 1.117.2.1 2005/10/09
@@ -187,7 +187,9 @@
} else if (mp->m_next == NULL) {
return NULL;
} else if (siz > MHLEN) {
- panic("nfs S too big");
+ MCLGET(mp2, how);
+ if (mp2 == NULL)
+ return NULL;
} else {
MGET(mp2, how, MT_DATA);
if (mp2 == NULL)
I actually tested it with 'how' being hardcoded to M_TRYWAIT.
I just wanted to flag this to see whether the fix is obviously wrong or
whether a such change could be incorporated into the kernel.
Thanks,
Martin
More information about the freebsd-net
mailing list