diff options
author | Christoph Hellwig <hch@infradead.org> | 2010-10-10 05:36:23 -0400 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2010-10-25 21:26:12 -0400 |
commit | 312d3ca856d369bb04d0443846b85b4cdde6fa8a (patch) | |
tree | cf95d01cffaf02bf53c2bb0f7c2c924279ec6eeb /include/linux/fs.h | |
parent | 9c82ab9c9e16cb9edf17bd0d31f3d6904afce04f (diff) |
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/linux/fs.h')
-rw-r--r-- | include/linux/fs.h | 2 |
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, | |||
2490 | struct ctl_table; | 2490 | struct ctl_table; |
2491 | int proc_nr_files(struct ctl_table *table, int write, | 2491 | int proc_nr_files(struct ctl_table *table, int write, |
2492 | void __user *buffer, size_t *lenp, loff_t *ppos); | 2492 | void __user *buffer, size_t *lenp, loff_t *ppos); |
2493 | int proc_nr_dentry(struct ctl_table *table, int write, | ||
2494 | void __user *buffer, size_t *lenp, loff_t *ppos); | ||
2493 | int proc_nr_inodes(struct ctl_table *table, int write, | 2495 | int proc_nr_inodes(struct ctl_table *table, int write, |
2494 | void __user *buffer, size_t *lenp, loff_t *ppos); | 2496 | void __user *buffer, size_t *lenp, loff_t *ppos); |
2495 | int __init get_filesystem_list(char *buf); | 2497 | int __init get_filesystem_list(char *buf); |