From mboxrd@z Thu Jan 1 00:00:00 1970 From: Andreas Gruenbacher Subject: Re: [RFC] Pack the vfsmount and dentry in nameidata into a struct path Date: Sun, 4 Feb 2007 04:00:51 -0800 Message-ID: <200702040400.51958.agruen@suse.de> References: <200702031425.38054.agruen@suse.de> <20070204041653.GA3672@lazybastard.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: QUOTED-PRINTABLE Cc: linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org To: =?utf-8?q?J=C3=B6rn_Engel?= Return-path: Received: from ns1.suse.de ([195.135.220.2]:58989 "EHLO mx1.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751977AbXBDMBT (ORCPT ); Sun, 4 Feb 2007 07:01:19 -0500 In-Reply-To: <20070204041653.GA3672@lazybastard.org> Content-Disposition: inline Sender: linux-fsdevel-owner@vger.kernel.org List-Id: linux-fsdevel.vger.kernel.org On Saturday 03 February 2007 20:16, J=C3=B6rn Engel wrote: > On its own, I don't like this patch too much. It is just a form of > mental masturbation that complicates the source. Thanks for pointing out the masturbation thing. I was actually polling = for=20 comments; this single patch in itself wasn't meant to be the ultimate h= ot=20 stuff. > > - inode =3D nd.dentry->d_inode; > > + inode =3D nd.path.dentry->d_inode; > > However, once we start passing struct path by reference, it should > result in a smaller binary. There are several components to it. Storing the dentry and vfsmount in = a=20 struct path allows to pass them somewhere where a struct path is expect= ed=20 without having to construct a temporary struct path object. Also, two=20 parameters would become one; I believe that this could lead to somewhat= =20 cleaner code in some places. The other question is whether we would want to pass such struct paths b= y value=20 or by reference: by value would lead to roughly the same code that we h= ave=20 right now. By reference would reduce the function call overhead, but wo= uld=20 blow up the code that accesses the struct path elements by about the sa= me=20 amount: getting to the dentry or vfsmount from a struct path pointer re= quires=20 a pointer dereference. It's hard to tell whether the code size would decrease overall with=20 by-reference passing. The experiments I did didn't, but I also didn't t= ry to=20 optimize the by-reference code. Thanks, Andreas - To unsubscribe from this list: send the line "unsubscribe linux-fsdevel= " in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html