From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nick Piggin Subject: Re: [PATCH v3 1/7] fs: Use a percpu_counter to track nr_dentry Date: Tue, 24 Jul 2007 11:24:51 +1000 Message-ID: <200707241124.52675.nickpiggin@yahoo.com.au> References: <493100B0.6090104@cosmosbay.com> <49419680.8010409@cosmosbay.com> Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <49419680.8010409@cosmosbay.com> Content-Disposition: inline Sender: linux-fsdevel-owner@vger.kernel.org List-ID: Content-Type: text/plain; charset="us-ascii" To: Eric Dumazet Cc: Andrew Morton , Ingo Molnar , Christoph Hellwig , David Miller , "Rafael J. Wysocki" , linux-kernel@vger.kernel.org, "kernel-testers@vger.kernel.org >> Kernel Testers List" , Mike Galbraith , Peter Zijlstra , Linux Netdev List , Christoph Lameter , linux-fsdevel@vger.kernel.org, Al Viro , "Paul E. McKenney" On Friday 12 December 2008 09:38, Eric Dumazet wrote: > Adding a percpu_counter nr_dentry avoids cache line ping pongs > between cpus to maintain this metric, and dcache_lock is > no more needed to protect dentry_stat.nr_dentry > > We centralize nr_dentry updates at the right place : > - increments in d_alloc() > - decrements in d_free() > > d_alloc() can avoid taking dcache_lock if parent is NULL > > ("socketallocbench -n8" result : 27.5s to 25s) Seems like a good idea. > @@ -696,7 +712,7 @@ static void shrink_dcache_for_umount_subtree(struct > dentry *dentry) * otherwise we ascend to the parent and move to the > * next sibling if there is one */ > if (!parent) > - goto out; > + return; > > dentry = parent; > Andrew doesn't like return from middle of function.