Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 125005
b: refs/heads/master
c: b6b3fde
h: refs/heads/master
i:
  125003: 8d8bdcc
v: v3
  • Loading branch information
Eric Dumazet authored and Al Viro committed Dec 31, 2008
1 parent 1c90a16 commit 4642a88
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 10 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: fd659fd6275d3426d7967da1f0e3638bbbd2fedb
refs/heads/master: b6b3fdead251d432f32f2cfce2a893ab8a658110
6 changes: 0 additions & 6 deletions trunk/fs/dcache.c
Original file line number Diff line number Diff line change
Expand Up @@ -2314,9 +2314,6 @@ static void __init dcache_init(void)
/* SLAB cache for __getname() consumers */
struct kmem_cache *names_cachep __read_mostly;

/* SLAB cache for file structures */
struct kmem_cache *filp_cachep __read_mostly;

EXPORT_SYMBOL(d_genocide);

void __init vfs_caches_init_early(void)
Expand All @@ -2338,9 +2335,6 @@ void __init vfs_caches_init(unsigned long mempages)
names_cachep = kmem_cache_create("names_cache", PATH_MAX, 0,
SLAB_HWCACHE_ALIGN|SLAB_PANIC, NULL);

filp_cachep = kmem_cache_create("filp", sizeof(struct file), 0,
SLAB_HWCACHE_ALIGN|SLAB_PANIC, NULL);

dcache_init();
inode_init();
files_init(mempages);
Expand Down
10 changes: 9 additions & 1 deletion trunk/fs/file_table.c
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,9 @@ struct files_stat_struct files_stat = {
/* public. Not pretty! */
__cacheline_aligned_in_smp DEFINE_SPINLOCK(files_lock);

/* SLAB cache for file structures */
static struct kmem_cache *filp_cachep __read_mostly;

static struct percpu_counter nr_files __cacheline_aligned_in_smp;

static inline void file_free_rcu(struct rcu_head *head)
Expand Down Expand Up @@ -397,7 +400,12 @@ int fs_may_remount_ro(struct super_block *sb)
void __init files_init(unsigned long mempages)
{
int n;
/* One file with associated inode and dcache is very roughly 1K.

filp_cachep = kmem_cache_create("filp", sizeof(struct file), 0,
SLAB_HWCACHE_ALIGN | SLAB_PANIC, NULL);

/*
* One file with associated inode and dcache is very roughly 1K.
* Per default don't use more than 10% of our memory for files.
*/

Expand Down
2 changes: 0 additions & 2 deletions trunk/include/linux/fdtable.h
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,6 @@ struct files_struct {

#define files_fdtable(files) (rcu_dereference((files)->fdt))

extern struct kmem_cache *filp_cachep;

struct file_operations;
struct vfsmount;
struct dentry;
Expand Down

0 comments on commit 4642a88

Please sign in to comment.