Date: Tue, 02 Mar 2004 05:24:34 -0600 From: Jon Noack <noackjr@alumni.rice.edu> To: freebsd-current@freebsd.org Cc: Harald Schmalzbauer <h@schmalzbauer.de> Subject: patch for Linux NFS client Message-ID: <40446EF2.5020901@alumni.rice.edu>
next in thread | raw e-mail | index | archive | help
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--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?40446EF2.5020901>