Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 07 Jun 2006 14:01:50 -0400
From:      Martin Karsten <mkarsten@cs.uwaterloo.ca>
To:        freebsd-net@freebsd.org
Subject:   mbuf size and NFS
Message-ID:  <4487148E.4020807@cs.uwaterloo.ca>

next in thread | raw e-mail | index | archive | help
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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?4487148E.4020807>