diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2013-10-31 18:43:02 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2013-10-31 18:43:02 -0400 |
commit | 358eec18243ac025b2eb0317ab52bd247e1b03c6 (patch) | |
tree | 551bb789fa555bd26851a6d43bd78c6c3a398d00 /fs | |
parent | 0baab4fd6de4beb3393e173b392038d01da54bec (diff) |
vfs: decrapify dput(), fix cache behavior under normal load
We do not want to dirty the dentry->d_flags cacheline in dput() just to
set the DCACHE_REFERENCED flag when it is already set in the common case
anyway. This way the first cacheline of the dentry (which contains the
RCU lookup information etc) can stay shared among multiple CPU's.
This finishes off some of the details of all the scalability patches
merged during the merge window.
Also don't mark dentry_kill() for inlining, since it's the uncommon path
and inlining it just makes the common path slower due to extra function
entry/exit overhead.
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'fs')
-rw-r--r-- | fs/dcache.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/fs/dcache.c b/fs/dcache.c index 20532cb0b06e..ae6ebb88ceff 100644 --- a/fs/dcache.c +++ b/fs/dcache.c | |||
@@ -542,7 +542,7 @@ EXPORT_SYMBOL(d_drop); | |||
542 | * If ref is non-zero, then decrement the refcount too. | 542 | * If ref is non-zero, then decrement the refcount too. |
543 | * Returns dentry requiring refcount drop, or NULL if we're done. | 543 | * Returns dentry requiring refcount drop, or NULL if we're done. |
544 | */ | 544 | */ |
545 | static inline struct dentry * | 545 | static struct dentry * |
546 | dentry_kill(struct dentry *dentry, int unlock_on_failure) | 546 | dentry_kill(struct dentry *dentry, int unlock_on_failure) |
547 | __releases(dentry->d_lock) | 547 | __releases(dentry->d_lock) |
548 | { | 548 | { |
@@ -630,7 +630,8 @@ repeat: | |||
630 | goto kill_it; | 630 | goto kill_it; |
631 | } | 631 | } |
632 | 632 | ||
633 | dentry->d_flags |= DCACHE_REFERENCED; | 633 | if (!(dentry->d_flags & DCACHE_REFERENCED)) |
634 | dentry->d_flags |= DCACHE_REFERENCED; | ||
634 | dentry_lru_add(dentry); | 635 | dentry_lru_add(dentry); |
635 | 636 | ||
636 | dentry->d_lockref.count--; | 637 | dentry->d_lockref.count--; |