diff options
author | Chao Yu <yuchao0@huawei.com> | 2020-02-25 11:17:10 +0100 |
---|---|---|
committer | Jaegeuk Kim <jaegeuk@kernel.org> | 2020-03-23 05:16:27 +0100 |
commit | a999150f4fe3abbb7efd05411fd5b460be699943 (patch) | |
tree | 08afcb75aaf48ab33888a594827aa68883789964 /fs/f2fs/xattr.h | |
parent | f2fs: skip migration only when BG_GC is called (diff) | |
download | linux-a999150f4fe3abbb7efd05411fd5b460be699943.tar.xz linux-a999150f4fe3abbb7efd05411fd5b460be699943.zip |
f2fs: use kmem_cache pool during inline xattr lookups
It's been observed that kzalloc() on lookup_all_xattrs() are called millions
of times on Android, quickly becoming the top abuser of slub memory allocator.
Use a dedicated kmem cache pool for xattr lookups to mitigate this.
Signed-off-by: Park Ju Hyung <qkrwngud825@gmail.com>
Signed-off-by: Chao Yu <yuchao0@huawei.com>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
Diffstat (limited to 'fs/f2fs/xattr.h')
-rw-r--r-- | fs/f2fs/xattr.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/fs/f2fs/xattr.h b/fs/f2fs/xattr.h index 574beea46494..0153b4c9ef21 100644 --- a/fs/f2fs/xattr.h +++ b/fs/f2fs/xattr.h @@ -131,6 +131,8 @@ extern int f2fs_setxattr(struct inode *, int, const char *, extern int f2fs_getxattr(struct inode *, int, const char *, void *, size_t, struct page *); extern ssize_t f2fs_listxattr(struct dentry *, char *, size_t); +extern int f2fs_init_xattr_caches(struct f2fs_sb_info *); +extern void f2fs_destroy_xattr_caches(struct f2fs_sb_info *); #else #define f2fs_xattr_handlers NULL @@ -151,6 +153,8 @@ static inline ssize_t f2fs_listxattr(struct dentry *dentry, char *buffer, { return -EOPNOTSUPP; } +static int f2fs_init_xattr_caches(struct f2fs_sb_info *sbi) { return 0; } +static void f2fs_destroy_xattr_caches(struct f2fs_sb_info *sbi) { } #endif #ifdef CONFIG_F2FS_FS_SECURITY |