From owner-freebsd-current@FreeBSD.ORG Thu May 21 14:33:22 2009 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 33917106566C; Thu, 21 May 2009 14:33:22 +0000 (UTC) (envelope-from sam@freebsd.org) Received: from ebb.errno.com (ebb.errno.com [69.12.149.25]) by mx1.freebsd.org (Postfix) with ESMTP id D72348FC19; Thu, 21 May 2009 14:33:21 +0000 (UTC) (envelope-from sam@freebsd.org) Received: from trouble.errno.com (trouble.errno.com [10.0.0.248]) (authenticated bits=0) by ebb.errno.com (8.13.6/8.12.6) with ESMTP id n4LEXK4F066652 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Thu, 21 May 2009 07:33:21 -0700 (PDT) (envelope-from sam@freebsd.org) Message-ID: <4A156630.5080507@freebsd.org> Date: Thu, 21 May 2009 07:33:20 -0700 From: Sam Leffler Organization: FreeBSD Project User-Agent: Thunderbird 2.0.0.21 (X11/20090411) MIME-Version: 1.0 To: Doug Rabson References: <4A1460A3.2010202@freebsd.org> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-DCC--Metrics: ebb.errno.com; whitelist Cc: Andre Oppermann , rmacklem@uoguelph.ca, Robert Watson , freebsd-current@freebsd.org Subject: Re: Socket related code duplication in NFS X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 21 May 2009 14:33:22 -0000 Doug Rabson wrote: > On Thu, 21 May 2009 11:36:49 +0100 (BST), Robert Watson > wrote: > >> On Wed, 20 May 2009, Robert Watson wrote: >> >> >>> On Wed, 20 May 2009, Andre Oppermann wrote: >>> >>> >>>> While working on an optimized soreceive_stream() function [1] and >>>> checking >>>> the code how it is used I've come across quite a bit of code >>>> > duplication > >>>> in >>>> the various NFS directories. >>>> >>>> Socket (read) operations are handled multiple times in a very similar >>>> manner in these places: >>>> >>> My recommendation would be to do this analysis against the new NFS >>> > client > >>> and server found in sys/{kgssapi,nlm,fs/{nfs,nfsclient,nfsserver}}, >>> > which > >>> is >>> the NFSv234 implementation. Note in particular that in the new world >>> order >>> there's a centralize RPC implementation. >>> >>> The code you're looking at is a blend of the old NFSv23 client/server >>> (nfsclient/nfsserver) and the old NFSv4 client (rpc/nfs4client), all if >>> which are on a gradual de-orbit burn. >>> >> After re-reading this e-mail, I realize that I'd mislabeled src/sys/rpc >> > as > >> being only used by the old code -- this is in fact not the case, it's >> > also > >> used by the new code. >> > > Everything in src/sys/rpc except rpcclient.[ch] is part of the new RPC > transport. The files rpcclient.c and rpcclient.h are part of the old broken > NFSv4 client which is scheduled for removal. > > There is older RPC transport code in src/sys/nfsclient and > src/sys/nfsserver which is currently used if the user uses the > NFS_LEGACYRPC option. This too should be removed before 8.0 ships. > NFS_LEGACYRPC is the only code that works reliably for me on xscale (BE arm). The new code randomly causes alignment faults. I've not had time to track down this problem but gonzo@ also reported this problem on mips and I believe sent you a line# and stack trace of a fault. Until this problem is fixed removing legacy support cannot happen. Sam