From mboxrd@z Thu Jan 1 00:00:00 1970 From: Al Viro Subject: Re: [PATCH 1/2] VFS: Cut down inode->i_op->xyz accesses in path walking Date: Sat, 23 Jul 2011 00:40:13 +0100 Message-ID: <20110722234013.GD31405@ZenIV.linux.org.uk> References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: Christoph Hellwig , linux-fsdevel To: Linus Torvalds Return-path: Received: from zeniv.linux.org.uk ([195.92.253.2]:57908 "EHLO ZenIV.linux.org.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751434Ab1GVXkP (ORCPT ); Fri, 22 Jul 2011 19:40:15 -0400 Content-Disposition: inline In-Reply-To: Sender: linux-fsdevel-owner@vger.kernel.org List-ID: On Fri, Jul 22, 2011 at 10:37:58AM -0700, Linus Torvalds wrote: > > From: Linus Torvalds > Date: Fri, 22 Jul 2011 08:44:51 -0700 > Subject: [PATCH 1/2] VFS: Cut down inode->i_op->xyz accesses in path walking > > One of the biggest remaining unnecessary costs in path walking is the > pointer chasing in inode operations. We already avoided the > dentry->d_op derferences with the DCACHE_OP_xyz flags, this just starts > doing the same thing for the i_op->xyz cases. > + if (unlikely(inode->i_op->lookup)) > + dentry->d_flags |= DCACHE_OP_LOOKUP; > + if (unlikely(inode->i_op->permission)) > + dentry->d_flags |= DCACHE_OP_PERMISSION; > + if (unlikely(inode->i_op->follow_link)) > + dentry->d_flags |= DCACHE_OP_FOLLOW_LINK; I'm not sure about that one... What happens after ln -s foo bar; rm bar; touch bar;? IOW, where do you clean them? Other than that, it needs rebase on top of #for-next - conflicts with ->permission() series.