From owner-freebsd-arch@FreeBSD.ORG Thu Oct 22 07:33:55 2009 Return-Path: Delivered-To: arch@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D39791065672; Thu, 22 Oct 2009 07:33:55 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from mail10.syd.optusnet.com.au (mail10.syd.optusnet.com.au [211.29.132.191]) by mx1.freebsd.org (Postfix) with ESMTP id 582FA8FC19; Thu, 22 Oct 2009 07:33:54 +0000 (UTC) Received: from c122-106-156-249.carlnfd1.nsw.optusnet.com.au (c122-106-156-249.carlnfd1.nsw.optusnet.com.au [122.106.156.249]) by mail10.syd.optusnet.com.au (8.13.1/8.13.1) with ESMTP id n9M7Xqt9014634 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Thu, 22 Oct 2009 18:33:52 +1100 Date: Thu, 22 Oct 2009 18:33:52 +1100 (EST) From: Bruce Evans X-X-Sender: bde@delplex.bde.org To: John Baldwin In-Reply-To: <200910191634.30040.jhb@freebsd.org> Message-ID: <20091022182943.P13634@delplex.bde.org> References: <200910191634.30040.jhb@freebsd.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: arch@freebsd.org Subject: Re: Put a timeout on -ve name cache entries in NFS X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 22 Oct 2009 07:33:55 -0000 On Mon, 19 Oct 2009, John Baldwin wrote: > This patch allows one to put an upper time limit on how long the NFS client > should keep negative cache entries around for a given directory. This is > basically a safety belt as there are certain races with -ve entries that are > not easily fixed (e.g. dealing with the low resolution of the directory > modification timestamps). However, timing out the entries would put a limit > on how stale the client's cache entries could be. My main question is do > folks think this value should be tunable as a global sysctl or a per-mount > option. A sysctl is far easier to implement (and the acccess cache timeout > is a sysctl). However, the other namecache-related settings are all mount > options, so a mount option might be more consistent. Current rough patch is > below: One reason that I never committed my port of NetBSD's implementation of negative cache entries for nfs is that I thought the timeout should be a mount option but I didn't want to deal with the portability problems from that. Bruce