[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20081121153626.GA9281@infradead.org>
Date: Fri, 21 Nov 2008 10:36:26 -0500
From: Christoph Hellwig <hch@...radead.org>
To: Eric Dumazet <dada1@...mosbay.com>
Cc: David Miller <davem@...emloft.net>, mingo@...e.hu,
cl@...ux-foundation.org, rjw@...k.pl, linux-kernel@...r.kernel.org,
kernel-testers@...r.kernel.org, efault@....de,
a.p.zijlstra@...llo.nl, Linux Netdev List <netdev@...r.kernel.org>,
viro@...iv.linux.org.uk, linux-fsdevel@...r.kernel.org
Subject: Re: [PATCH] fs: pipe/sockets/anon dentries should not have a parent
On Fri, Nov 21, 2008 at 04:13:38PM +0100, Eric Dumazet wrote:
> [PATCH] fs: pipe/sockets/anon dentries should not have a parent
>
> Linking pipe/sockets/anon dentries to one root 'parent' has no functional
> impact at all, but a scalability one.
>
> We can avoid touching a cache line at allocation stage (inside d_alloc(), no need
> to touch root->d_count), but also at freeing time (in d_kill, decrementing d_count)
> We avoid an expensive atomic_dec_and_lock() call on the root dentry.
>
> If we correct dnotify_parent() and inotify_d_instantiate() to take into account
> a NULL d_parent, we can call d_alloc() with a NULL parent instead of root dentry.
Sorry folks, but a NULL d_parent is a no-go from the VFS perspective,
but you can set d_parent to the dentry itself which is the magic used
for root of tree dentries. They should also be marked
DCACHE_DISCONNECTED to make sure this is not unexpected.
And this kind of stuff really needs to go through -fsdevel.
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists