summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@infradead.org>2010-10-10 05:36:23 -0400
committerAl Viro <viro@zeniv.linux.org.uk>2010-10-25 21:26:12 -0400
commit312d3ca856d369bb04d0443846b85b4cdde6fa8a (patch)
treecf95d01cffaf02bf53c2bb0f7c2c924279ec6eeb /include
parent9c82ab9c9e16cb9edf17bd0d31f3d6904afce04f (diff)
downloadtalos-obmc-linux-312d3ca856d369bb04d0443846b85b4cdde6fa8a.tar.gz
talos-obmc-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 'include')
-rw-r--r--include/linux/fs.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/include/linux/fs.h b/include/linux/fs.h
index 4a573cf13f51..d58059944801 100644
--- a/include/linux/fs.h
+++ b/include/linux/fs.h
@@ -2490,6 +2490,8 @@ ssize_t simple_attr_write(struct file *file, const char __user *buf,
struct ctl_table;
int proc_nr_files(struct ctl_table *table, int write,
void __user *buffer, size_t *lenp, loff_t *ppos);
+int proc_nr_dentry(struct ctl_table *table, int write,
+ void __user *buffer, size_t *lenp, loff_t *ppos);
int proc_nr_inodes(struct ctl_table *table, int write,
void __user *buffer, size_t *lenp, loff_t *ppos);
int __init get_filesystem_list(char *buf);
OpenPOWER on IntegriCloud