From owner-freebsd-current@FreeBSD.ORG Tue Mar 2 03:24:47 2004 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id D5B4416A4CE for ; Tue, 2 Mar 2004 03:24:47 -0800 (PST) Received: from cmsrelay02.mx.net (cmsrelay02.mx.net [165.212.11.111]) by mx1.FreeBSD.org (Postfix) with SMTP id 75D7643D2F for ; Tue, 2 Mar 2004 03:24:47 -0800 (PST) (envelope-from noackjr@alumni.rice.edu) Received: from uadvg128.cms.usa.net (165.212.11.128) by cmsoutbound.mx.net with SMTP; 2 Mar 2004 11:24:46 -0000 Received: from optimator.noacks.org [66.136.22.254] by uadvg128.cms.usa.net (ASMTP/noackjr@usa.net) via mtad (C8.MAIN.3.13N) with ESMTP id 355icBLyr0344M28; Tue, 02 Mar 2004 11:24:43 GMT X-USANET-Auth: 66.136.22.254 AUTH noackjr@usa.net optimator.noacks.org Received: from localhost (localhost [127.0.0.1]) by optimator.noacks.org (Postfix) with ESMTP id 15205610E; Tue, 2 Mar 2004 05:24:43 -0600 (CST) Received: from optimator.noacks.org ([127.0.0.1]) by localhost (optimator.noacks.org [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 98462-07; Tue, 2 Mar 2004 05:24:38 -0600 (CST) Received: from alumni.rice.edu (compgeek [192.168.1.10]) by optimator.noacks.org (Postfix) with ESMTP id B64BD60FC; Tue, 2 Mar 2004 05:24:38 -0600 (CST) Message-ID: <40446EF2.5020901@alumni.rice.edu> Date: Tue, 02 Mar 2004 05:24:34 -0600 From: Jon Noack User-Agent: Mozilla Thunderbird 0.5 (Windows/20040207) X-Accept-Language: en-us, en MIME-Version: 1.0 To: freebsd-current@freebsd.org Content-Type: multipart/mixed; boundary="------------060807040300030002050904" X-Virus-Scanned: by amavisd-new at noacks.org cc: Harald Schmalzbauer Subject: patch for Linux NFS client X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: noackjr@alumni.rice.edu List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 02 Mar 2004 11:24:48 -0000 This is a multi-part message in MIME format. --------------060807040300030002050904 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit I happened upon the DragonFlyBSD diary [1] and saw an entry about NFS performance improvements. After some digging I came across a patch from David Rhodus to increase NFS performance between Linux clients and (Free|DragonFly)BSD servers [2]. The patch doesn't appear to have been committed to DragonFlyBSD, so there may be problems with it. This issue was diagnosed and reported to hackers@ last September by Richard Sharpe [3]. In any case, I've seen the Linux/FreeBSD NFS issue pop up [4,5], so maybe this will help a bit. Attached is a version of the patch I modified for FreeBSD (to correct line numbers and whitespace). Credit should go to David Rhodus (and Richard Sharpe). I'm not running NFS at present (and don't have any Linux machines anyway), SO THIS PATCH HAS NOT BEEN TESTED IN ANY WAY. If it works, great. Also, it probably deserves mention in the man page. I'm sure there are other fixes that are applicable to FreeBSD, but I don't have the know-how at this point to determine which. [1] DragonFlyBSD diary: http://www.dragonflybsd.org/status/diary.cgi [2] Patch by David Rhodus posted to the DragonFlyBSD Digest: http://www.shiningsilence.com/dbsdlog/archives/000063.html [3] Post by Richard Sharpe to hackers@ last September: http://lists.freebsd.org/pipermail/freebsd-hackers/2003-September/003269.html [4] Linux/FreeBSD NFS issue: http://lists.freebsd.org/pipermail/freebsd-current/2004-February/021546.html http://66.102.7.104/search?q=cache:http://www.richardsharpe.com/ethereal-stuff.html#Time%20Sequence%20Graphs [5] PRs concerning NFS with Linux (among the many NFS PRs): http://www.freebsd.org/cgi/query-pr.cgi?pr=kern/56461 http://www.freebsd.org/cgi/query-pr.cgi?pr=bin/56500 Jon Noack --------------060807040300030002050904 Content-Type: text/plain; name="nfs_syscalls.c.diff" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="nfs_syscalls.c.diff" --- sys/nfsserver/nfs_syscalls.c.orig Fri Nov 7 16:57:09 2003 +++ sys/nfsserver/nfs_syscalls.c Tue Mar 2 03:11:48 2004 @@ -100,6 +100,9 @@ &nfsrvw_procrastinate, 0, ""); SYSCTL_INT(_vfs_nfsrv, OID_AUTO, gatherdelay_v3, CTLFLAG_RW, &nfsrvw_procrastinate_v3, 0, ""); +static int sacksize = 2048; +SYSCTL_INT(_vfs_nfsrv, OID_AUTO, sacksize, CTLFLAG_RW, + &sacksize, 0, ""); static int nfssvc_addsock(struct file *, struct sockaddr *, struct thread *); @@ -217,7 +220,7 @@ } #endif if (so->so_type == SOCK_STREAM) - siz = NFS_MAXPACKET + sizeof (u_long); + siz = NFS_MAXPACKET + sizeof (u_long) + sacksize; else siz = NFS_MAXPACKET; error = soreserve(so, siz, siz); --------------060807040300030002050904--