In sock_attach_fd(), we are currently using

d_add(file->f_dentry, SOCK_INODE(sock));

This has the effect to insert the dentry into the dentry_hashtable.

I was wondering if it is really necessary : On a machine with many sockets, the dentry_hashtable lookups may be slowed down for no good reason. (sockets are not accessable by other means than socket() syscall, and not subject to 'unuse and LRU freeable syndrom').

If we replace d_add(file->f_dentry, SOCK_INODE(sock)) call by
d_instantiate(file->f_dentry, SOCK_INODE(sock)), we also avoid using rcu callback when socket is closed. (We would have to not provide a d_op->d_delete () method in sockfs_dentry_operations)

Maybe I just provide a patch instead of just talking ? :)

Eric
-
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to