diff options
author | Eric Dumazet <dada1@cosmosbay.com> | 2010-01-29 15:38:34 -0800 |
---|---|---|
committer | Thomas Gleixner <tglx@linutronix.de> | 2010-04-27 17:32:53 +0200 |
commit | d48369f49733ab843c216f41519eebc4fb1a5357 (patch) | |
tree | 304a2173fa6bc83729905a0300c48c190c9d9aa3 /include | |
parent | bf853e966141895df69363444c469d6dfeaa6f13 (diff) | |
download | lwn-d48369f49733ab843c216f41519eebc4fb1a5357.tar.gz lwn-d48369f49733ab843c216f41519eebc4fb1a5357.zip |
fs-nr_inodes-percpu
fs: inode per-cpu nr_inodes counter
Avoids cache line ping pongs between cpus and prepare next patch,
because updates of nr_inodes dont need inode_lock anymore.
Signed-off-by: Eric Dumazet <dada1@cosmosbay.com>
Signed-off-by: Nick Piggin <npiggin@suse.de>
Signed-off-by: John Stultz <johnstul@us.ibm.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/fs.h | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/include/linux/fs.h b/include/linux/fs.h index 59083ea0fe1b..63d5c2e7b398 100644 --- a/include/linux/fs.h +++ b/include/linux/fs.h @@ -407,6 +407,8 @@ extern struct files_stat_struct files_stat; extern int get_max_files(void); extern int sysctl_nr_open; extern struct inodes_stat_t inodes_stat; +extern struct percpu_counter nr_inodes; +extern int get_nr_inodes(void); extern int leases_enable, lease_break_time; #ifdef CONFIG_DNOTIFY extern int dir_notify_enable; @@ -2484,7 +2486,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_inodes(struct ctl_table *table, int write, + void __user *buffer, size_t *lenp, loff_t *ppos); int __init get_filesystem_list(char *buf); #define ACC_MODE(x) ("\004\002\006\006"[(x)&O_ACCMODE]) |