From owner-freebsd-fs@FreeBSD.ORG Sun Oct 15 20:59:28 2006 Return-Path: X-Original-To: fs@freebsd.org Delivered-To: freebsd-fs@FreeBSD.ORG Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id DF93516A403 for ; Sun, 15 Oct 2006 20:59:28 +0000 (UTC) (envelope-from mohan_srinivasan@yahoo.com) Received: from web30813.mail.mud.yahoo.com (web30813.mail.mud.yahoo.com [68.142.201.139]) by mx1.FreeBSD.org (Postfix) with SMTP id 48B6143D77 for ; Sun, 15 Oct 2006 20:59:24 +0000 (GMT) (envelope-from mohan_srinivasan@yahoo.com) Received: (qmail 49806 invoked by uid 60001); 15 Oct 2006 20:59:23 -0000 DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=Message-ID:Received:Date:From:Subject:To:Cc:In-Reply-To:MIME-Version:Content-Type:Content-Transfer-Encoding; b=R0/MP9JLtGZo49ZRVB5fPrdVjLR7tTpRvsarQphAO68+8I1ZqB8/IDHr0heP0xELYmGfsqBbxirE8hwnevS2fGSzxzeTOWsRiS4fYW3uUwfIK7CDxDBb4E0DvDa33zHkpzTKUH1D/S9PWkT2smZVhrMZ3G0PUHNPqKL9pgkYEHM= ; Message-ID: <20061015205923.49804.qmail@web30813.mail.mud.yahoo.com> Received: from [71.139.1.197] by web30813.mail.mud.yahoo.com via HTTP; Sun, 15 Oct 2006 13:59:23 PDT Date: Sun, 15 Oct 2006 13:59:23 -0700 (PDT) From: Mohan Srinivasan To: Bruce Evans , fs@freebsd.org In-Reply-To: <20061014143825.F1264@epsplex.bde.org> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit Cc: mohans@freebsd.org Subject: Re: lost dotdot caching pessimizes nfs especially X-BeenThere: freebsd-fs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Filesystems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 15 Oct 2006 20:59:29 -0000 Bruce Defending the "silliness" of the first of the 2 changes you cite as I am the author of that change. Just got back from a short break and am still catching up on this thread. The clearing of the attrcache on nfs_open() is a requirement for close-to-open consistency, and this change fixed bugs that we saw internally relating to close-to-open consistency. > and associated changes give silly behaviour that almost doubles the > number of Access RPCs. One of the associated changes clears n_attrstamp > on close(). Then on open(), since lookup() is called before the above > is reached, nfs_access_otw() has always just been called, and the above ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ > forces another call. That is not true with NFSv2 which doesn't have an access call, in which case nfsspec_access() calls VOP_GETATTR, which may or may not go over the wire. Also, what would happen with NFSv3 if we get an access cache hit ? If lookup() can be made to pass a flag into nfs_open() that an otw getattr was done, then we can eliminate the clearing of the attrcache in nfs_open(). But absent that flag, I don't see how you can eliminate the fetch of fresh attributes in nfs_open(). mohan