Thread (15 messages) 15 messages, 5 authors, 2006-11-29
STALE7133d

[RFC, PATCH] dont insert sockets/pipes dentries into dentry_hashtable.

From: Eric Dumazet <hidden>
Date: 2006-10-31 18:48:51
Also in: lkml

Hi David

Here is the patch I cooked after our mail exchange. (was [RFC] Any strong 
reason why socket dentries are hashed in global dentry_hashtable )

If necessary, I could split this patch in 4 elementary patches. I chose to 
sent it as one patch for initial discussion.

[RFC, PATCH] dont insert sockets/pipes dentries into dentry_hashtable.

We currently insert sockets/pipes dentries into the global dentry hashtable.
This is *useless* because there is currently no way these entries can be used 
for a lookup(). (/proc/xxx/fd/xxx uses a different mechanism)

Machines with a lot of sockets/pipes might suffer from longer chains in dentry 
hashtable.

The goals of this patch are :

[0] No more insertion in hashtable of sockets/pipes dentries.

[1] Introduction of a DENTRY_DELETED flag, that can distinguish dentries that 
were deleted and others in d_path(). (previous code was using d_unhashed())

[2] Small optimization to bypass RCU freeing in d_free() for dentries that 
were never hashed (like sockets and pipes). Such dentries dont have to wait a 
RCU grace period.

[3] Plug socket code to use d_instantiate() instead of d_hash()
   (No more need for a private d_delete function, and dentry_operations)

[4] Plug pipe code to use d_instantiate() instead of d_hash()
   (No more need for a private d_delete function, and dentry_operations)

Another step would be to eliminate dentries for sockets/pipes, but that's 
another story. (Or at least allocate them from a separate kmem_cache_t as 
they are not reclaimable, and they might be smaller than a full dentry)

Signed-off-by: Eric Dumazet <redacted>

Attachments

Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help