kernel-ark/net
Eric Dumazet 304e61e6fb [PATCH] net: don't insert socket dentries into dentry_hashtable
We currently insert socket dentries into the global dentry hashtable.  This
is suboptimal because there is currently no way these entries can be used
for a lookup().  (/proc/xxx/fd/xxx uses a different mechanism).  Inserting
them in dentry hashtable slows dcache lookups.

To let __dpath() still work correctly (ie not adding a " (deleted)") after
dentry name, we do :

- Right after d_alloc(), pretend they are hashed by clearing the
  DCACHE_UNHASHED bit.

- Call d_instantiate() instead of d_add() : dentry is not inserted in
  hash table.

  __dpath() & friends work as intended during dentry lifetime.

- At dismantle time, once dput() must clear the dentry, setting again
  DCACHE_UNHASHED bit inside the custom d_delete() function provided by
  socket code, so that dput() can just kill_it.

Signed-off-by: Eric Dumazet <dada1@cosmosbay.com>
Cc: Al Viro <viro@zeniv.linux.org.uk>
Acked-by: "David S. Miller" <davem@davemloft.net>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-12-07 08:39:41 -08:00
..
802
8021q
appletalk
atm
ax25
bluetooth
bridge [PATCH] slab: remove kmem_cache_t 2006-12-07 08:39:25 -08:00
core [PATCH] hotplug CPU: clean up hotcpu_notifier() use 2006-12-07 08:39:39 -08:00
dccp [PATCH] slab: remove kmem_cache_t 2006-12-07 08:39:25 -08:00
decnet [PATCH] slab: remove kmem_cache_t 2006-12-07 08:39:25 -08:00
econet
ethernet
ieee80211
ipv4 [PATCH] slab: remove kmem_cache_t 2006-12-07 08:39:25 -08:00
ipv6 [PATCH] slab: remove kmem_cache_t 2006-12-07 08:39:25 -08:00
ipx
irda
key
lapb
llc
netfilter [PATCH] slab: remove kmem_cache_t 2006-12-07 08:39:25 -08:00
netlabel
netlink
netrom
packet
rose
rxrpc [PATCH] Add include/linux/freezer.h and move definitions from sched.h 2006-12-07 08:39:27 -08:00
sched
sctp [PATCH] slab: remove kmem_cache_t 2006-12-07 08:39:25 -08:00
sunrpc [PATCH] lockdep: name some old style locks 2006-12-07 08:39:36 -08:00
tipc [PATCH] slab: remove kmem_cache_t 2006-12-07 08:39:25 -08:00
unix
wanrouter
x25
xfrm [PATCH] slab: remove kmem_cache_t 2006-12-07 08:39:25 -08:00
compat.c
Kconfig
Makefile
nonet.c
socket.c [PATCH] net: don't insert socket dentries into dentry_hashtable 2006-12-07 08:39:41 -08:00
sysctl_net.c
TUNABLE