From: Eric Dumazet <dada1@cosmosbay.com>
To: David Miller <davem@davemloft.net>
Cc: netdev@vger.kernel.org
Subject: [RFC] Any strong reason why socket dentries are hashed in global d_hash table ?
Date: Mon, 30 Oct 2006 22:30:39 +0100 [thread overview]
Message-ID: <45466EFF.5060108@cosmosbay.com> (raw)
In-Reply-To: <20061029.160402.92581862.davem@davemloft.net>
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
next prev parent reply other threads:[~2006-10-30 21:34 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-10-29 21:24 [PATCH] DCCP: fix printk format warnings Randy Dunlap
2006-10-30 0:04 ` David Miller
2006-10-30 21:30 ` Eric Dumazet [this message]
2006-10-30 22:15 ` [RFC] Any strong reason why socket dentries are hashed in global d_hash table ? David Miller
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=45466EFF.5060108@cosmosbay.com \
--to=dada1@cosmosbay.com \
--cc=davem@davemloft.net \
--cc=netdev@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox