From owner-freebsd-net@FreeBSD.ORG Wed Jun 7 19:40:16 2006 Return-Path: X-Original-To: freebsd-net@freebsd.org Delivered-To: freebsd-net@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 3DCC016CC42 for ; Wed, 7 Jun 2006 18:01:53 +0000 (UTC) (envelope-from mkarsten@cs.uwaterloo.ca) Received: from services110.cs.uwaterloo.ca (services110.cs.uwaterloo.ca [129.97.152.166]) by mx1.FreeBSD.org (Postfix) with ESMTP id CF9FF43D45 for ; Wed, 7 Jun 2006 18:01:52 +0000 (GMT) (envelope-from mkarsten@cs.uwaterloo.ca) Received: from [129.97.34.33] (kalli.uwaterloo.ca [129.97.34.33]) (authenticated bits=0) by services110.cs.uwaterloo.ca (8.13.6/8.13.6) with ESMTP id k57I1oH8017844 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Wed, 7 Jun 2006 14:01:51 -0400 (EDT) Message-ID: <4487148E.4020807@cs.uwaterloo.ca> Date: Wed, 07 Jun 2006 14:01:50 -0400 From: Martin Karsten User-Agent: Mozilla Thunderbird 1.0.8-1.1.fc4 (X11/20060501) X-Accept-Language: en-us, en MIME-Version: 1.0 To: freebsd-net@freebsd.org Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Miltered: at demeter with ID 4487148E.003 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Virus-Scanned: ClamAV version 0.88.2, clamav-milter version 0.88.2 on localhost X-Virus-Status: Clean Subject: mbuf size and NFS X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 07 Jun 2006 19:40:22 -0000 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