From owner-freebsd-stable@FreeBSD.ORG Sun Dec 28 16:29:01 2014 Return-Path: Delivered-To: freebsd-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 37F1735E for ; Sun, 28 Dec 2014 16:29:01 +0000 (UTC) Received: from bigwig.baldwin.cx (bigwig.baldwin.cx [IPv6:2001:470:1f11:75::1]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 11BEC6491F for ; Sun, 28 Dec 2014 16:29:01 +0000 (UTC) Received: from ralph.baldwin.cx (pool-173-70-85-31.nwrknj.fios.verizon.net [173.70.85.31]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id 2CD2AB924; Sun, 28 Dec 2014 11:29:00 -0500 (EST) From: John Baldwin To: Richard Perini Subject: Re: NFS negative name caching and amd Date: Sun, 28 Dec 2014 11:27:29 -0500 Message-ID: <2226907.ffl2dAmvtd@ralph.baldwin.cx> User-Agent: KMail/4.14.2 (FreeBSD/10.1-STABLE; KDE/4.14.2; amd64; ; ) In-Reply-To: <20141222232527.GA52306@odi.ci.com.au> References: <20141221102746.GA11278@odi.ci.com.au> <201412221004.48504.jhb@freebsd.org> <20141222232527.GA52306@odi.ci.com.au> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.7 (bigwig.baldwin.cx); Sun, 28 Dec 2014 11:29:00 -0500 (EST) Cc: freebsd-stable@freebsd.org X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 28 Dec 2014 16:29:01 -0000 On Tuesday, December 23, 2014 10:25:27 AM Richard Perini wrote: > I just ran up autofs and automountd on 10-stable, set the negnametimeo > option in auto_master and it works a treat. However it will be quite > some time before we're able to shift off 9 which leaves us with the > kernel option as the easiest path. > > I'd point out that the nfs client code in > /usr/src/sys/fs/nfsclient/nfsmount.h is already coded to allow override: > > ifndef NFS_DEFAULT_NEGNAMETIMEO > #define NFS_DEFAULT_NEGNAMETIMEO 60 > #endif > > so all that is required is the entry in the "options" file. Naturally > we can add that ourselves (the beauty of open source :-) but it would > be the only change to the native FreeBSD code for us, so of course > we'd prefer to see it in the tree. > > Regards, and compliments of the season. I think for the future (10.x and later) the autofs solution is preferred, so the option would be unused if added to HEAD. (I also think setting it via autofs is preferable as it is better documented and is more fine-grained since it is per-mount.) Given that, I would only add the option on 9.x. However, I think there's another route you can use to set this option using a stock source tree. First, you could set COPTFLAGS in /etc/src.conf and add '-DNFS_DEFAULT_NEGNAMETIMEO=0' to it (e.g. set COPTFLAGS to "-O2 -pipe -D