aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux
diff options
context:
space:
mode:
authorChengguang Xu <cgxu519@gmx.com>2018-03-12 22:42:44 -0400
committerIlya Dryomov <idryomov@gmail.com>2018-04-02 04:12:49 -0400
commitbb48bd4dc45f9ee1e44d8e9fcb01023e0d0ba80d (patch)
treeb844653552011036270e965137f7af0ea4345291 /include/linux
parent47474d0b011bb385719e91a60bb9ff7649d66526 (diff)
ceph: optimize memory usage
In current code, regular file and directory use same struct ceph_file_info to store fs specific data so the struct has to include some fields which are only used for directory (e.g., readdir related info), when having plenty of regular files, it will lead to memory waste. This patch introduces dedicated ceph_dir_file_info cache for readdir related thins. So that regular file does not include those unused fields anymore. Signed-off-by: Chengguang Xu <cgxu519@gmx.com> Reviewed-by: "Yan, Zheng" <zyan@redhat.com> Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/ceph/libceph.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/include/linux/ceph/libceph.h b/include/linux/ceph/libceph.h
index c2ec44cf5098..49c93b9308d7 100644
--- a/include/linux/ceph/libceph.h
+++ b/include/linux/ceph/libceph.h
@@ -262,6 +262,7 @@ extern struct kmem_cache *ceph_cap_cachep;
262extern struct kmem_cache *ceph_cap_flush_cachep; 262extern struct kmem_cache *ceph_cap_flush_cachep;
263extern struct kmem_cache *ceph_dentry_cachep; 263extern struct kmem_cache *ceph_dentry_cachep;
264extern struct kmem_cache *ceph_file_cachep; 264extern struct kmem_cache *ceph_file_cachep;
265extern struct kmem_cache *ceph_dir_file_cachep;
265 266
266/* ceph_common.c */ 267/* ceph_common.c */
267extern bool libceph_compatible(void *data); 268extern bool libceph_compatible(void *data);