From: Marcelo Tosatti Shrinks "struct dentry" from 128 bytes to 124 on x86, allowing 31 objects per slab instead of 30. Cc: John Levon Cc: Philippe Elie Signed-off-by: Andrew Morton --- fs/dcache.c | 2 ++ include/linux/dcache.h | 2 ++ 2 files changed, 4 insertions(+) diff -puN fs/dcache.c~make-struct-d_cookie-dependable-on-config_profiling fs/dcache.c --- devel/fs/dcache.c~make-struct-d_cookie-dependable-on-config_profiling 2006-01-21 23:27:57.000000000 -0800 +++ devel-akpm/fs/dcache.c 2006-01-21 23:56:53.000000000 -0800 @@ -743,7 +743,9 @@ struct dentry *d_alloc(struct dentry * p dentry->d_op = NULL; dentry->d_fsdata = NULL; dentry->d_mounted = 0; +#ifdef CONFIG_PROFILING dentry->d_cookie = NULL; +#endif INIT_HLIST_NODE(&dentry->d_hash); INIT_LIST_HEAD(&dentry->d_lru); INIT_LIST_HEAD(&dentry->d_subdirs); diff -puN include/linux/dcache.h~make-struct-d_cookie-dependable-on-config_profiling include/linux/dcache.h --- devel/include/linux/dcache.h~make-struct-d_cookie-dependable-on-config_profiling 2006-01-21 23:27:57.000000000 -0800 +++ devel-akpm/include/linux/dcache.h 2006-01-21 23:56:53.000000000 -0800 @@ -108,7 +108,9 @@ struct dentry { struct dentry_operations *d_op; struct super_block *d_sb; /* The root of the dentry tree */ void *d_fsdata; /* fs-specific data */ +#ifdef CONFIG_PROFILING struct dcookie_struct *d_cookie; /* cookie, if any */ +#endif int d_mounted; unsigned char d_iname[DNAME_INLINE_LEN_MIN]; /* small names */ }; _