diff options
author | Christoph Hellwig <hch@infradead.org> | 2010-10-10 11:36:23 +0200 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2010-10-26 03:26:12 +0200 |
commit | 312d3ca856d369bb04d0443846b85b4cdde6fa8a (patch) | |
tree | cf95d01cffaf02bf53c2bb0f7c2c924279ec6eeb /kernel/sysctl.c | |
parent | fs: simplify __d_free (diff) | |
download | linux-312d3ca856d369bb04d0443846b85b4cdde6fa8a.tar.xz linux-312d3ca856d369bb04d0443846b85b4cdde6fa8a.zip |
fs: use percpu counter for nr_dentry and nr_dentry_unused
The nr_dentry stat is a globally touched cacheline and atomic operation
twice over the lifetime of a dentry. It is used for the benfit of userspace
only. Turn it into a per-cpu counter and always decrement it in d_free instead
of doing various batching operations to reduce lock hold times in the callers.
Based on an earlier patch from Nick Piggin <npiggin@suse.de>.
Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'kernel/sysctl.c')
-rw-r--r-- | kernel/sysctl.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/kernel/sysctl.c b/kernel/sysctl.c index 99a510cbfbb3..8b77ff5c502c 100644 --- a/kernel/sysctl.c +++ b/kernel/sysctl.c @@ -1377,7 +1377,7 @@ static struct ctl_table fs_table[] = { .data = &dentry_stat, .maxlen = 6*sizeof(int), .mode = 0444, - .proc_handler = proc_dointvec, + .proc_handler = proc_nr_dentry, }, { .procname = "overflowuid", |