From mboxrd@z Thu Jan 1 00:00:00 1970 From: Andreas Gruenbacher Subject: Re: [AppArmor 39/45] AppArmor: Profile loading and manipulation, pathname matching Date: Fri, 22 Jun 2007 11:59:13 +0200 Message-ID: <200706221159.13948.agruen@suse.de> References: <20070514110607.549397248@suse.de> <20070616002012.GH2616@elf.ucw.cz> Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Cc: david@lang.hm, Greg KH , Crispin Cowan , Stephen Smalley , jjohansen@suse.de, linux-kernel@vger.kernel.org, linux-security-module@vger.kernel.org, linux-fsdevel@vger.kernel.org To: Pavel Machek Return-path: Received: from mail.suse.de ([195.135.220.2]:48541 "EHLO mx1.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751577AbXFVJ7n (ORCPT ); Fri, 22 Jun 2007 05:59:43 -0400 In-Reply-To: <20070616002012.GH2616@elf.ucw.cz> Content-Disposition: inline Sender: linux-fsdevel-owner@vger.kernel.org List-Id: linux-fsdevel.vger.kernel.org On Saturday 16 June 2007 02:20, Pavel Machek wrote: > Ok, so mv gets slower for big trees... and open() gets faster for deep > trees. Previously, open in current directory was one atomic read of > directory entry, now it has to read directory, and its parent, and its > parent parent, and its... > > (Or am I wrong and getting full path does not need to bring anything > in, not even in cache-cold case?) You are wrong, indeed. The dentries in the dcache are connected to the dcache through their parent dentry pointers, which means that the parent dentries are always in memory, too. No I/O is involved for walking up dentry trees. (Caveat: nfsd does allow disconnected dentries. It does not make sense to try confining an in-kernel daemon though, an no user process can ever access a dentry before it gets connected (lookup does that), so this difference is irrelevant here.)