From owner-freebsd-current@FreeBSD.ORG Sun Sep 4 19:41:54 2011 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 85F771065673 for ; Sun, 4 Sep 2011 19:41:54 +0000 (UTC) (envelope-from yanegomi@gmail.com) Received: from mail-qy0-f182.google.com (mail-qy0-f182.google.com [209.85.216.182]) by mx1.freebsd.org (Postfix) with ESMTP id 413668FC13 for ; Sun, 4 Sep 2011 19:41:54 +0000 (UTC) Received: by qyk9 with SMTP id 9so2852940qyk.13 for ; Sun, 04 Sep 2011 12:41:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; bh=BRTy/KP9+ZgY/aNqS3TnkXLN67MU5IaBcQMtK0zD+lE=; b=snLUJGKcUvp0in0ncQatjRFW6JjxMllFlJXNnFRYda+a65cPxrr22SeP2mot9fdRBn ywA6zefrn+zh0y2yrnm89Ez9LCt5O/VROb8h0h3BfGvtpSV9dhJlii9GEcZ/6BcpG5rp ixUq6oaxpNWkzO3aMhg8yQDJDf47XpFR4lUOQ= MIME-Version: 1.0 Received: by 10.224.191.202 with SMTP id dn10mr2607364qab.42.1315165313528; Sun, 04 Sep 2011 12:41:53 -0700 (PDT) Received: by 10.224.37.83 with HTTP; Sun, 4 Sep 2011 12:41:53 -0700 (PDT) In-Reply-To: References: <1678816683.746981.1315009505581.JavaMail.root@erie.cs.uoguelph.ca> <20110904162102.GA30321@gmail.com> Date: Sun, 4 Sep 2011 12:41:53 -0700 Message-ID: From: Garrett Cooper To: FreeBSD Current Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Cc: Rick Macklem Subject: Re: newnfs user setup 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: Sun, 04 Sep 2011 19:41:54 -0000 On Sun, Sep 4, 2011 at 9:28 AM, Brandon Gooch wrote: > On Fri, Sep 02, 2011 at 08:25:05PM -0400, Rick Macklem wrote: >> Brandon Gooch wrote: >> > On Thu, Sep 1, 2011 at 8:09 PM, Brandon Gooch >> > wrote: >> > > On Fri, May 27, 2011 at 8:09 AM, Rick Macklem >> > > wrote: >> > >>> On Thu, 26 May 2011, Rick Macklem wrote: >> > >>> ... >> > >>> > ??http://people.freebsd.org/~rmacklem/dtrace.patch >> > >>> > >> > >>> Hmm. Is it just me? >> > >>> Trying to test the patch I get: >> > >>> >> > >>> (fs)(root) patch -C < dtrace.patch >> > >>> Hmm... I can't seem to find a patch in there anywhere. >> > >>> >> > >> Here's how I apply the patch. >> > >> - download dtrace.patch to somewhere, lets say /tmp, then >> > >> # cd /usr/src/sys <-- sys subdirectory of a current head, >> > >> ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? which you don't mind messing up >> > >> ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? doesn't have to be at /usr/src/sys= , >> > >> ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? of course. >> > >> # patch -p1 < /tmp/dtrace.patch >> > >> >> > >> rick >> > >> >> > > >> > > What's the status on this patch? It would be nice to get >> > > dtrace/newnfs >> > > going for 9.0...it's not too late, right? >> > > >> > > I'll test the patch too BTW :) >> > > >> > > -Brandon >> > > >> > >> > So it looks like the patch was committed to HEAD, but the bits to >> > support the New NFS implementation were never flipped on -- is that >> > for a good reason? >> > >> I know nothing about Dtrace, so if something needs to be changed/fixed, >> someone who understands these things will have to let me know. >> >> When I built a kernel with "options KDTRACE_HOOKS" and set >> dtraceall_load=3D"YES" in /etc/rc.conf, >> it booted and >> # dtrace -l >> - seemed to find the stuff (it's called "dtnfscl", btw). >> >> Someone told me that's how you check it's loaded and that's all I >> know how to do w.r.t. dtrace. >> >> If you can test/debug it, that would be great, rick > > Actually, the problem is not with DTrace functioning, but with the > dtnfsclient.ko module: > > brandon@m6500:~$ sudo kldload dtnfsclient > kldload: can't load dtnfsclient: Exec format error > > brandon@m6500:~$ dmesg > ... > link_elf_obj: symbol nfsclient_accesscache_flush_done_id undefined > linker_load_file: Unsupported file type > ... =A0 =A0After fixing a DTrace module related build bug (see kern/160463), I was able to build and install dtrace and both the old and new NFS client dtrace providers were loaded: $ sudo dtrace -l | grep nfs | wc -l =A0 =A02472 $ kldstat -v | grep dtnfs 22 =A0 =A01 0xffffffff8133d000 57ca =A0 =A0 dtnfscl.ko (/boot/kernel/dtnfsc= l.ko) =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0234 dtnfscl 24 =A0 =A01 0xffffffff81385000 4f64 =A0 =A0 dtnfsclient.ko (/boot/kernel/dt= nfsclient.ko) =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0237 dtnfsclient =A0 =A0Be sure to read through what's required to get DTrace going from the handbook: http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/dtr= ace-enable.html . > Any hints on debugging undefined symbols? =A0 =A0This is a runtime linker error because it can't find the symbol -- in particular if you don't define some of the required options (like DDB_CTF, WITH_CTF=3D1), things don't load too terribly well. HTH, -Garrett