From owner-freebsd-fs@FreeBSD.ORG Fri May 21 00:29:55 2010 Return-Path: Delivered-To: fs@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3CFF9106566C; Fri, 21 May 2010 00:29:55 +0000 (UTC) (envelope-from rmacklem@uoguelph.ca) Received: from esa-jnhn.mail.uoguelph.ca (esa-jnhn.mail.uoguelph.ca [131.104.91.44]) by mx1.freebsd.org (Postfix) with ESMTP id A549E8FC13; Fri, 21 May 2010 00:29:54 +0000 (UTC) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AvsEAHRw9UuDaFvK/2dsb2JhbACeHXG/HoJcgjYE X-IronPort-AV: E=Sophos;i="4.53,274,1272859200"; d="scan'208";a="77162935" Received: from fraser.cs.uoguelph.ca ([131.104.91.202]) by esa-jnhn-pri.mail.uoguelph.ca with ESMTP; 20 May 2010 20:29:53 -0400 Received: from localhost (localhost.localdomain [127.0.0.1]) by fraser.cs.uoguelph.ca (Postfix) with ESMTP id B27E9109C2E5; Thu, 20 May 2010 20:29:53 -0400 (EDT) X-Virus-Scanned: amavisd-new at fraser.cs.uoguelph.ca Received: from fraser.cs.uoguelph.ca ([127.0.0.1]) by localhost (fraser.cs.uoguelph.ca [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id M6ENSUL+MRzn; Thu, 20 May 2010 20:29:53 -0400 (EDT) Received: from muncher.cs.uoguelph.ca (muncher.cs.uoguelph.ca [131.104.91.102]) by fraser.cs.uoguelph.ca (Postfix) with ESMTP id 463DD109C2E1; Thu, 20 May 2010 20:29:53 -0400 (EDT) Received: from localhost (rmacklem@localhost) by muncher.cs.uoguelph.ca (8.11.7p3+Sun/8.11.6) with ESMTP id o4L0jD416381; Thu, 20 May 2010 20:45:13 -0400 (EDT) X-Authentication-Warning: muncher.cs.uoguelph.ca: rmacklem owned process doing -bs Date: Thu, 20 May 2010 20:45:13 -0400 (EDT) From: Rick Macklem X-X-Sender: rmacklem@muncher.cs.uoguelph.ca To: John Baldwin In-Reply-To: <201005200922.17245.jhb@freebsd.org> Message-ID: References: <201005191144.00382.jhb@freebsd.org> <201005200922.17245.jhb@freebsd.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: Rick Macklem , Robert Watson , fs@freebsd.org Subject: Re: [PATCH] Better handling of stale filehandles in open() in the NFS client 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: Fri, 21 May 2010 00:29:55 -0000 On Thu, 20 May 2010, John Baldwin wrote: > > It doesn't change the RPC count because of changes that Mohan added to the > NFS client a while ago so that nfs_open() doesn't invalide the attribute > cache during nfs_open() if it was already updated via nfs_lookup() during > the same system call. With Mohan's changes in place, all this change does > is move the GETATTR/ACCESS RPC earlier in the case of a namecache hit. > Well, it sounds like a good theory. Something like: - VOP_LOOKUP() locks the vnode, which is then passed to VOP_OPEN() and since it is locked, other threads can't perform VOPs on the vp. I ran a single pass of a kernel "make cleandepend; make depend; make" here (1 without the patch and one with the patch). Now, it could be random variation, but since the other RPC counts changed by < 1%, I suspect not. (I'll run another pass of each to see how much variation I see w.r.t. Getattr.) Here's the counts for the 5 RPCs I think might be interesting: RPC Count without patch Count with patch Getattr 590936 625987 +5.9% Lookup 157194 157528 Access 59040 59690 +1.1% Read 70585 70586 Write 112531 112530 I let you know what another pass of each gives, but it looks like it has caused an increase in RPC cnts. I don't know if the increase is enough to deter adding the patch, but it might be worth exploring it more? rick