From: hawkes@sgi.com (John Hawkes)
To: linux-kernel@vger.kernel.org, rml@novell.com
Subject: 2.6.10-mm3 scaling problem with inotify
Date: Thu, 13 Jan 2005 16:51:52 -0800 [thread overview]
Message-ID: <41E717A8.Mail7BE150TM8@jackhammer.engr.sgi.com> (raw)
I believe I've encountered a scaling problem with the inotify code in
2.6.10-mm3.
vfs_read() and vfs_write() (for example) do:
dnotify_parent(dentry, DN_ACCESS);
inotify_dentry_parent_queue_event(dentry,
IN_ACCESS, 0, dentry->d_name.name);
inotify_inode_queue_event(inode, IN_ACCESS, 0, NULL);
for the optional "notify" functionality.
dnotify_parent() knows how to exit quickly:
if (!dir_notify_enable)
return;
looking at a global flag, and inotify_inode_queue_event() also knows a quick
exit:
if (!inode->inotify_data)
return;
However, inotify_dentry_parent_queue_event() first has to get the parent
dentry:
parent = dget_parent(dentry);
inotify_inode_queue_event(parent->d_inode, mask, cookie, filename);
dput(parent);
and, sadly, dget_parent(dentry) grabs a spinlock (dentry->d_lock) and dirties a cacheline (dentry->dcount). I have an AIM7-like workload that does numerous
concurrent reads and suffers a 40% drop in performance because of this.
Is it possible for a parent's inode->inotify_data to be enabled when none of
its children's inotify_data are enabled? That would make it easy - just look
at the current inode's inotify_data before walking back to the parent.
John Hawkes
next reply other threads:[~2005-01-14 1:04 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-01-14 0:51 John Hawkes [this message]
-- strict thread matches above, loose matches on Subject: below --
2005-01-14 2:31 Zou, Nanhai
2005-01-14 2:36 ` John McCutchan
2005-01-14 2:41 ` Robert Love
2005-01-13 23:56 John Hawkes
2005-01-14 0:49 ` Robert Love
2005-01-14 1:31 ` John McCutchan
2005-01-14 2:29 ` Robert Love
2005-01-14 18:05 ` John Hawkes
2005-01-14 18:15 ` Robert Love
2005-01-14 18:39 ` John Hawkes
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=41E717A8.Mail7BE150TM8@jackhammer.engr.sgi.com \
--to=hawkes@sgi.com \
--cc=linux-kernel@vger.kernel.org \
--cc=rml@novell.com \
/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
Powered by JetHome